mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-24 17:23:25 -05:00
gpiolib: make gpiochip_get_desc() public
It makes sense for a GPIO driver to want to get its own descriptor without requesting it. After all, the driver knows that it'll still be valid. Let's move this helper to linux/gpio/driver.h. Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> Reviewed-by: Andy Shevchenko <andy@kernel.org> Acked-by: Linus Walleij <linus.walleij@linaro.org>
This commit is contained in:
parent
d56c6f798a
commit
fe4fa2e4f7
2 changed files with 2 additions and 2 deletions
|
@ -122,8 +122,6 @@ struct gpio_array {
|
|||
unsigned long invert_mask[];
|
||||
};
|
||||
|
||||
struct gpio_desc *gpiochip_get_desc(struct gpio_chip *gc, unsigned int hwnum);
|
||||
|
||||
#define for_each_gpio_desc(gc, desc) \
|
||||
for (unsigned int __i = 0; \
|
||||
__i < gc->ngpio && (desc = gpiochip_get_desc(gc, __i)); \
|
||||
|
|
|
@ -757,6 +757,8 @@ struct gpio_desc *gpiochip_request_own_desc(struct gpio_chip *gc,
|
|||
enum gpiod_flags dflags);
|
||||
void gpiochip_free_own_desc(struct gpio_desc *desc);
|
||||
|
||||
struct gpio_desc *gpiochip_get_desc(struct gpio_chip *gc, unsigned int hwnum);
|
||||
|
||||
#ifdef CONFIG_GPIOLIB
|
||||
|
||||
/* lock/unlock as IRQ */
|
||||
|
|
Loading…
Add table
Reference in a new issue