diff options
author | Geert Uytterhoeven <geert+renesas@glider.be> | 2020-03-25 11:04:39 +0100 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2020-03-27 22:38:38 +0100 |
commit | 5f4bf171ca03b79f0ed7a17216fd854e50955617 (patch) | |
tree | 83a4ca032c8f64cbe1f95b8d2aab6f9031a003c2 /drivers/gpio/gpiolib.c | |
parent | gpiolib: Pass gpio_desc to gpio_set_config() (diff) | |
download | linux-5f4bf171ca03b79f0ed7a17216fd854e50955617.tar.xz linux-5f4bf171ca03b79f0ed7a17216fd854e50955617.zip |
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 <geert+renesas@glider.be>
Link: https://lore.kernel.org/r/20200325100439.14000-3-geert+renesas@glider.be
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r-- | drivers/gpio/gpiolib.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 0541c9ff22b3..8acb0c96fa4c 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -3216,7 +3216,7 @@ static int gpio_set_config(struct gpio_desc *desc, enum pin_config_param mode) return gpio_do_set_config(chip, gpio_chip_hwgpio(desc), config); } -static int gpio_set_bias(struct gpio_chip *chip, struct gpio_desc *desc) +static int gpio_set_bias(struct gpio_desc *desc) { int bias = 0; int ret = 0; @@ -3282,7 +3282,7 @@ int gpiod_direction_input(struct gpio_desc *desc) } if (ret == 0) { clear_bit(FLAG_IS_OUT, &desc->flags); - ret = gpio_set_bias(chip, desc); + ret = gpio_set_bias(desc); } trace_gpio_direction(desc_to_gpio(desc), 1, ret); @@ -3366,7 +3366,6 @@ EXPORT_SYMBOL_GPL(gpiod_direction_output_raw); */ int gpiod_direction_output(struct gpio_desc *desc, int value) { - struct gpio_chip *gc; int ret; VALIDATE_DESC(desc); @@ -3384,7 +3383,6 @@ int gpiod_direction_output(struct gpio_desc *desc, int value) return -EIO; } - gc = desc->gdev->chip; if (test_bit(FLAG_OPEN_DRAIN, &desc->flags)) { /* First see if we can enable open drain in hardware */ ret = gpio_set_config(desc, PIN_CONFIG_DRIVE_OPEN_DRAIN); @@ -3410,7 +3408,7 @@ int gpiod_direction_output(struct gpio_desc *desc, int value) } set_output_value: - ret = gpio_set_bias(gc, desc); + ret = gpio_set_bias(desc); if (ret) return ret; return gpiod_direction_output_raw_commit(desc, value); |