Skip to content

Commit 62adc6f

Browse files
committed
gpiolib: fix gpio_do_set_config()
Commit d90f368 ("gpiolib: have a single place of calling set_config()") introduced a regression where we don't pass the right variable as argument to the set_config() callback of gpio driver from gpio_set_config(). After reverting two additional patches that came on top of it - this addresses the issue by changing the type of the last argument of gpio_do_set_config() to unsigned long and making sure the packed config variable is actually used in gpio_set_config(). Fixes: d90f368 ("gpiolib: have a single place of calling set_config()") Signed-off-by: Bartosz Golaszewski <[email protected]> Tested-by: Guenter Roeck <[email protected]>
1 parent 91b4ea5 commit 62adc6f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/gpio/gpiolib.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3036,12 +3036,12 @@ EXPORT_SYMBOL_GPL(gpiochip_free_own_desc);
30363036
*/
30373037

30383038
static int gpio_do_set_config(struct gpio_chip *gc, unsigned int offset,
3039-
enum pin_config_param mode)
3039+
unsigned long config)
30403040
{
30413041
if (!gc->set_config)
30423042
return -ENOTSUPP;
30433043

3044-
return gc->set_config(gc, offset, mode);
3044+
return gc->set_config(gc, offset, config);
30453045
}
30463046

30473047
static int gpio_set_config(struct gpio_chip *gc, unsigned int offset,
@@ -3062,7 +3062,7 @@ static int gpio_set_config(struct gpio_chip *gc, unsigned int offset,
30623062
}
30633063

30643064
config = PIN_CONF_PACKED(mode, arg);
3065-
return gpio_do_set_config(gc, offset, mode);
3065+
return gpio_do_set_config(gc, offset, config);
30663066
}
30673067

30683068
static int gpio_set_bias(struct gpio_chip *chip, struct gpio_desc *desc)

0 commit comments

Comments
 (0)