mirror of
https://github.com/torvalds/linux.git
synced 2026-04-18 06:44:00 -04:00
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>
27 lines
462 B
C
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 */
|