diff options
author | Kent Gibson <warthog618@gmail.com> | 2020-06-16 11:36:15 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-06-20 22:38:37 +0200 |
commit | 925ca36913fc7dfee9d0bb7f36d81dd108a7b80f (patch) | |
tree | 0120ec15bed1f10bc70d6480572a66aaaece69eb /drivers/gpio/gpiolib-cdev.h | |
parent | gpio: max732x: remove redundant check (diff) | |
download | linux-925ca36913fc7dfee9d0bb7f36d81dd108a7b80f.tar.xz linux-925ca36913fc7dfee9d0bb7f36d81dd108a7b80f.zip |
gpiolib: split character device into gpiolib-cdev
Split the cdev specific functionality out of gpiolib.c and into
gpiolib-cdev.c. This improves the readability and maintainability of both
the cdev and core gpiolib code.
Suggested-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Signed-off-by: Kent Gibson <warthog618@gmail.com>
Link: https://lore.kernel.org/r/20200616093615.5167-1-warthog618@gmail.com
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib-cdev.h')
-rw-r--r-- | drivers/gpio/gpiolib-cdev.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpio/gpiolib-cdev.h b/drivers/gpio/gpiolib-cdev.h new file mode 100644 index 000000000000..973578e7ad10 --- /dev/null +++ b/drivers/gpio/gpiolib-cdev.h @@ -0,0 +1,11 @@ +/* SPDX-License-Identifier: GPL-2.0 */ + +#ifndef GPIOLIB_CDEV_H +#define GPIOLIB_CDEV_H + +#include <linux/device.h> + +int gpiolib_cdev_register(struct gpio_device *gdev, dev_t devt); +void gpiolib_cdev_unregister(struct gpio_device *gdev); + +#endif /* GPIOLIB_CDEV_H */ |