summaryrefslogtreecommitdiffstats
path: root/drivers/gpio
diff options
context:
space:
mode:
authorGrant Likely2011-12-12 17:25:57 +0100
committerGrant Likely2011-12-12 21:40:16 +0100
commit1a2d397a6eb5cf40c382d9e3d4bc04aaeb025336 (patch)
treede928bf30efd84464d173359ae29f6a48b545b31 /drivers/gpio
parentgpio/microblaze: Eliminate duplication of of_get_named_gpio_flags() (diff)
downloadkernel-qcow2-linux-1a2d397a6eb5cf40c382d9e3d4bc04aaeb025336.tar.gz
kernel-qcow2-linux-1a2d397a6eb5cf40c382d9e3d4bc04aaeb025336.tar.xz
kernel-qcow2-linux-1a2d397a6eb5cf40c382d9e3d4bc04aaeb025336.zip
gpio/powerpc: Eliminate duplication of of_get_named_gpio_flags()
A large chunk of qe_pin_request() is unnecessarily cut-and-paste directly from of_get_named_gpio_flags(). This patch cuts out the duplicate code and replaces it with a call to of_get_gpio(). v2: fixed compile error due to missing gpio_to_chip() Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'drivers/gpio')
-rw-r--r--drivers/gpio/gpiolib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index 698f59ea7c18..17fdf4b6af93 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -114,7 +114,7 @@ static int gpio_ensure_requested(struct gpio_desc *desc, unsigned offset)
}
/* caller holds gpio_lock *OR* gpio is marked as requested */
-static inline struct gpio_chip *gpio_to_chip(unsigned gpio)
+struct gpio_chip *gpio_to_chip(unsigned gpio)
{
return gpio_desc[gpio].chip;
}