gpio-rb4xx: fix rb4xx_gpio_set on newer kernels
Propagate error code from rb4xx_gpio_cpld_set instead of just returning 0. Signed-off-by: Rosen Penev <rosenp@gmail.com> Link: https://github.com/openwrt/openwrt/pull/23731 Signed-off-by: Jonas Jelonek <jelonek.jonas@gmail.com>
This commit is contained in:
@@ -96,18 +96,19 @@ static int rb4xx_gpio_get(struct gpio_chip *chip, unsigned int offset)
|
||||
}
|
||||
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,17,0)
|
||||
static int
|
||||
static int rb4xx_gpio_set(struct gpio_chip *chip, unsigned int offset,
|
||||
int value)
|
||||
{
|
||||
return rb4xx_gpio_cpld_set(gpiochip_get_data(chip), offset, value);
|
||||
}
|
||||
#else
|
||||
static void
|
||||
#endif
|
||||
rb4xx_gpio_set(struct gpio_chip *chip, unsigned int offset,
|
||||
int value)
|
||||
{
|
||||
rb4xx_gpio_cpld_set(gpiochip_get_data(chip), offset, value);
|
||||
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,17,0)
|
||||
return 0;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
static int rb4xx_gpio_probe(struct platform_device *pdev)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user