diff options
author | Linus Walleij <linus.walleij@linaro.org> | 2020-09-30 11:35:56 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-09-30 11:35:56 +0200 |
commit | 3d5a46544b97ca1c446e13f4aa1b0f811e5a0a7c (patch) | |
tree | 05cad20d35499986c1f9b6be8d4146842108f327 /drivers/gpio/gpiolib-cdev.h | |
parent | 12d16b397ce0a999d13762c4c0cae2fb82eb60ee (diff) | |
parent | cf048e05b68789e9fa35f246f8ecbe95d79f4173 (diff) |
Merge tag 'gpio-updates-for-v5.10-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux into devel
gpio updates for v5.10 - part 2
- refactor gpio-mockup testing module
- simplify the code in gpio-mpc8xxx
- implement v2 of the GPIO user API
Diffstat (limited to 'drivers/gpio/gpiolib-cdev.h')
-rw-r--r-- | drivers/gpio/gpiolib-cdev.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib-cdev.h b/drivers/gpio/gpiolib-cdev.h index 973578e7ad10..19a4e3d57120 100644 --- a/drivers/gpio/gpiolib-cdev.h +++ b/drivers/gpio/gpiolib-cdev.h @@ -5,7 +5,22 @@ #include <linux/device.h> +#ifdef CONFIG_GPIO_CDEV + int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt); void gpiolib_cdev_unregister(struct gpio_device *gdev); +#else + +static inline int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt) +{ + return 0; +} + +static inline void gpiolib_cdev_unregister(struct gpio_device *gdev) +{ +} + +#endif /* CONFIG_GPIO_CDEV */ + #endif /* GPIOLIB_CDEV_H */ |