]> git.baikalelectronics.ru Git - kernel.git/commitdiff
Revert "gpiolib: remove set but not used variable 'config'"
authorBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 3 Feb 2020 13:03:47 +0000 (14:03 +0100)
committerBartosz Golaszewski <bgolaszewski@baylibre.com>
Mon, 10 Feb 2020 09:55:18 +0000 (10:55 +0100)
This reverts commit 4ea16903986ede1adbcbc4fabd40f73f62709486.

This patch came on top of another patch that introduced a regression.
Revert it before addressing the culprit.

Signed-off-by: Bartosz Golaszewski <bgolaszewski@baylibre.com>
Tested-by: Guenter Roeck <linux@roeck-us.net>
drivers/gpio/gpiolib.c

index a3e4f5f5871f7505d91ba38ba14ef86a44dadd02..c317567eeaa08acfc5f47018157b1b07b31d5f38 100644 (file)
@@ -3047,6 +3047,7 @@ static int gpio_do_set_config(struct gpio_chip *gc, unsigned int offset,
 static int gpio_set_config(struct gpio_chip *gc, unsigned int offset,
                           enum pin_config_param mode)
 {
+       unsigned long config;
        unsigned arg;
 
        switch (mode) {
@@ -3060,6 +3061,7 @@ static int gpio_set_config(struct gpio_chip *gc, unsigned int offset,
                arg = 0;
        }
 
+       config = PIN_CONF_PACKED(mode, arg);
        return gpio_do_set_config(gc, offset, mode);
 }