Skip to content

Commit 5f4bf17

Browse files
geertulinusw
authored andcommitted
gpiolib: Remove unused gpio_chip parameter from gpio_set_bias()
gpio_set_bias() no longer uses the passed gpio_chip pointer parameter. Remove it. Signed-off-by: Geert Uytterhoeven <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Linus Walleij <[email protected]>
1 parent 8352235 commit 5f4bf17

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

drivers/gpio/gpiolib.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3216,7 +3216,7 @@ static int gpio_set_config(struct gpio_desc *desc, enum pin_config_param mode)
32163216
return gpio_do_set_config(chip, gpio_chip_hwgpio(desc), config);
32173217
}
32183218

3219-
static int gpio_set_bias(struct gpio_chip *chip, struct gpio_desc *desc)
3219+
static int gpio_set_bias(struct gpio_desc *desc)
32203220
{
32213221
int bias = 0;
32223222
int ret = 0;
@@ -3282,7 +3282,7 @@ int gpiod_direction_input(struct gpio_desc *desc)
32823282
}
32833283
if (ret == 0) {
32843284
clear_bit(FLAG_IS_OUT, &desc->flags);
3285-
ret = gpio_set_bias(chip, desc);
3285+
ret = gpio_set_bias(desc);
32863286
}
32873287

32883288
trace_gpio_direction(desc_to_gpio(desc), 1, ret);
@@ -3366,7 +3366,6 @@ EXPORT_SYMBOL_GPL(gpiod_direction_output_raw);
33663366
*/
33673367
int gpiod_direction_output(struct gpio_desc *desc, int value)
33683368
{
3369-
struct gpio_chip *gc;
33703369
int ret;
33713370

33723371
VALIDATE_DESC(desc);
@@ -3384,7 +3383,6 @@ int gpiod_direction_output(struct gpio_desc *desc, int value)
33843383
return -EIO;
33853384
}
33863385

3387-
gc = desc->gdev->chip;
33883386
if (test_bit(FLAG_OPEN_DRAIN, &desc->flags)) {
33893387
/* First see if we can enable open drain in hardware */
33903388
ret = gpio_set_config(desc, PIN_CONFIG_DRIVE_OPEN_DRAIN);
@@ -3410,7 +3408,7 @@ int gpiod_direction_output(struct gpio_desc *desc, int value)
34103408
}
34113409

34123410
set_output_value:
3413-
ret = gpio_set_bias(gc, desc);
3411+
ret = gpio_set_bias(desc);
34143412
if (ret)
34153413
return ret;
34163414
return gpiod_direction_output_raw_commit(desc, value);

0 commit comments

Comments
 (0)