diff options
Diffstat (limited to 'drivers/gpio/gpiolib-cdev.h')
-rw-r--r-- | drivers/gpio/gpiolib-cdev.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/drivers/gpio/gpiolib-cdev.h b/drivers/gpio/gpiolib-cdev.h index 973578e7ad10..cb41dd757338 100644 --- a/drivers/gpio/gpiolib-cdev.h +++ b/drivers/gpio/gpiolib-cdev.h @@ -3,9 +3,26 @@ #ifndef GPIOLIB_CDEV_H #define GPIOLIB_CDEV_H -#include <linux/device.h> +#include <linux/types.h> + +struct gpio_device; + +#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 */ |