gpiolib: acpi: Change type of dflags
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>
Wed, 10 Apr 2019 15:39:18 +0000 (18:39 +0300)
committerLinus Walleij <linus.walleij@linaro.org>
Tue, 23 Apr 2019 08:55:14 +0000 (10:55 +0200)
Most of the code inside GPIO library is using enum gpiod_flags.
Some of the function still operate with unsigned int.

In order to be more consistent and better type checking, convert
acpi_gpiochip_parse_own_gpio() to use enum gpiod_flags instead of
unsigned int.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Acked-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
drivers/gpio/gpiolib-acpi.c

index 6ee929d90a6afeaadf09b3e4de134f4ab966c161..36cd9abe5e555d75eb19c2d647692d69b05d62fe 100644 (file)
@@ -1001,7 +1001,7 @@ acpi_gpiochip_parse_own_gpio(struct acpi_gpio_chip *achip,
                             struct fwnode_handle *fwnode,
                             const char **name,
                             unsigned long *lflags,
-                            unsigned int *dflags)
+                            enum gpiod_flags *dflags)
 {
        struct gpio_chip *chip = achip->chip;
        struct gpio_desc *desc;
@@ -1045,7 +1045,7 @@ static void acpi_gpiochip_scan_gpios(struct acpi_gpio_chip *achip)
 
        device_for_each_child_node(chip->parent, fwnode) {
                unsigned long lflags;
-               unsigned int dflags;
+               enum gpiod_flags dflags;
                struct gpio_desc *desc;
                const char *name;
                int ret;