Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpiolib: Replace unsigned by unsigned int

Replace unsigned by unsigned int in GPIO library code.
Note, legacy API left untouched.

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

+10 -10
+8 -8
drivers/gpio/gpiolib.c
··· 211 211 int gpiod_get_direction(struct gpio_desc *desc) 212 212 { 213 213 struct gpio_chip *gc; 214 - unsigned offset; 214 + unsigned int offset; 215 215 int ret; 216 216 217 217 gc = gpiod_to_chip(desc); ··· 1333 1333 } 1334 1334 EXPORT_SYMBOL_GPL(gpiochip_irq_domain_deactivate); 1335 1335 1336 - static int gpiochip_to_irq(struct gpio_chip *gc, unsigned offset) 1336 + static int gpiochip_to_irq(struct gpio_chip *gc, unsigned int offset) 1337 1337 { 1338 1338 struct irq_domain *domain = gc->irq.domain; 1339 1339 ··· 1635 1635 * @gc: the gpiochip owning the GPIO 1636 1636 * @offset: the offset of the GPIO to request for GPIO function 1637 1637 */ 1638 - int gpiochip_generic_request(struct gpio_chip *gc, unsigned offset) 1638 + int gpiochip_generic_request(struct gpio_chip *gc, unsigned int offset) 1639 1639 { 1640 1640 #ifdef CONFIG_PINCTRL 1641 1641 if (list_empty(&gc->gpiodev->pin_ranges)) ··· 1651 1651 * @gc: the gpiochip to request the gpio function for 1652 1652 * @offset: the offset of the GPIO to free from GPIO function 1653 1653 */ 1654 - void gpiochip_generic_free(struct gpio_chip *gc, unsigned offset) 1654 + void gpiochip_generic_free(struct gpio_chip *gc, unsigned int offset) 1655 1655 { 1656 1656 pinctrl_gpio_free(gc->gpiodev->base + offset); 1657 1657 } ··· 1663 1663 * @offset: the offset of the GPIO to apply the configuration 1664 1664 * @config: the configuration to be applied 1665 1665 */ 1666 - int gpiochip_generic_config(struct gpio_chip *gc, unsigned offset, 1666 + int gpiochip_generic_config(struct gpio_chip *gc, unsigned int offset, 1667 1667 unsigned long config) 1668 1668 { 1669 1669 return pinctrl_gpio_set_config(gc->gpiodev->base + offset, config); ··· 1993 1993 * help with diagnostics, and knowing that the signal is used as a GPIO 1994 1994 * can help avoid accidentally multiplexing it to another controller. 1995 1995 */ 1996 - const char *gpiochip_is_requested(struct gpio_chip *gc, unsigned offset) 1996 + const char *gpiochip_is_requested(struct gpio_chip *gc, unsigned int offset) 1997 1997 { 1998 1998 struct gpio_desc *desc; 1999 1999 ··· 2097 2097 { 2098 2098 struct gpio_chip *gc = desc->gdev->chip; 2099 2099 unsigned long config; 2100 - unsigned arg; 2100 + unsigned int arg; 2101 2101 2102 2102 switch (mode) { 2103 2103 case PIN_CONFIG_BIAS_PULL_DOWN: ··· 2353 2353 * 0 on success, %-ENOTSUPP if the controller doesn't support setting the 2354 2354 * debounce time. 2355 2355 */ 2356 - int gpiod_set_debounce(struct gpio_desc *desc, unsigned debounce) 2356 + int gpiod_set_debounce(struct gpio_desc *desc, unsigned int debounce) 2357 2357 { 2358 2358 unsigned long config; 2359 2359
+2 -2
include/linux/gpio/consumer.h
··· 158 158 unsigned long *value_bitmap); 159 159 160 160 int gpiod_set_config(struct gpio_desc *desc, unsigned long config); 161 - int gpiod_set_debounce(struct gpio_desc *desc, unsigned debounce); 161 + int gpiod_set_debounce(struct gpio_desc *desc, unsigned int debounce); 162 162 int gpiod_set_transitory(struct gpio_desc *desc, bool transitory); 163 163 void gpiod_toggle_active_low(struct gpio_desc *desc); 164 164 ··· 481 481 return -ENOSYS; 482 482 } 483 483 484 - static inline int gpiod_set_debounce(struct gpio_desc *desc, unsigned debounce) 484 + static inline int gpiod_set_debounce(struct gpio_desc *desc, unsigned int debounce) 485 485 { 486 486 /* GPIO can never have been requested */ 487 487 WARN_ON(desc);