Most of the code inside GPIO library is using enum gpio_lookup_flags. Some of the function still operate with unsigned long. In order to be more consistent and better type checking, convert gpiod_hog() and gpiod_configure_flags() to use enum gpio_lookup_flags instead of unsigned long. Signed-off-by: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx> --- drivers/gpio/gpiolib.c | 4 ++-- drivers/gpio/gpiolib.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index a3fe41a2c6c0..ea0d38164b06 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -4078,7 +4078,7 @@ EXPORT_SYMBOL_GPL(gpiod_get_optional); * occurred while trying to acquire the GPIO. */ int gpiod_configure_flags(struct gpio_desc *desc, const char *con_id, - unsigned long lflags, enum gpiod_flags dflags) + enum gpio_lookup_flags lflags, enum gpiod_flags dflags) { int status; @@ -4397,7 +4397,7 @@ EXPORT_SYMBOL_GPL(gpiod_get_index_optional); * @dflags: gpiod_flags - optional GPIO initialization flags */ int gpiod_hog(struct gpio_desc *desc, const char *name, - unsigned long lflags, enum gpiod_flags dflags) + enum gpio_lookup_flags lflags, enum gpiod_flags dflags) { struct gpio_chip *chip; struct gpio_desc *local_desc; diff --git a/drivers/gpio/gpiolib.h b/drivers/gpio/gpiolib.h index 078ab17b96bf..81061e5f9b22 100644 --- a/drivers/gpio/gpiolib.h +++ b/drivers/gpio/gpiolib.h @@ -231,9 +231,9 @@ struct gpio_desc { int gpiod_request(struct gpio_desc *desc, const char *label); void gpiod_free(struct gpio_desc *desc); int gpiod_configure_flags(struct gpio_desc *desc, const char *con_id, - unsigned long lflags, enum gpiod_flags dflags); + enum gpio_lookup_flags lflags, enum gpiod_flags dflags); int gpiod_hog(struct gpio_desc *desc, const char *name, - unsigned long lflags, enum gpiod_flags dflags); + enum gpio_lookup_flags lflags, enum gpiod_flags dflags); /* * Return the GPIO number of the passed descriptor relative to its chip -- 2.20.1