Files
linux/drivers/gpio/gpiolib-sysfs.h
Tzung-Bi Shih cf674f1a0c gpio: Ensure struct gpio_chip for gpiochip_setup_dev()
Ensure struct gpio_chip for gpiochip_setup_dev().  This eliminates a few
checks for struct gpio_chip.

Signed-off-by: Tzung-Bi Shih <tzungbi@kernel.org>
Link: https://patch.msgid.link/20260223061726.82161-5-tzungbi@kernel.org
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
2026-02-27 10:05:21 +01:00

27 lines
462 B
C

/* SPDX-License-Identifier: GPL-2.0 */
#ifndef GPIOLIB_SYSFS_H
#define GPIOLIB_SYSFS_H
struct gpio_device;
#ifdef CONFIG_GPIO_SYSFS
int gpiochip_sysfs_register(struct gpio_chip *gc);
void gpiochip_sysfs_unregister(struct gpio_chip *gc);
#else
static inline int gpiochip_sysfs_register(struct gpio_chip *gc)
{
return 0;
}
static inline void gpiochip_sysfs_unregister(struct gpio_chip *gc)
{
}
#endif /* CONFIG_GPIO_SYSFS */
#endif /* GPIOLIB_SYSFS_H */