From 0e4011ebbc1bee52fd65b1cba5da6fddbd588377 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Mon, 19 Sep 2016 10:14:29 +0200 Subject: gpio: tc3589x: fix up complaints on unsigned A bunch of variables were just declared "unsigned" and should be "unsigned int". Fix it up for this driver. Signed-off-by: Linus Walleij --- drivers/gpio/gpio-tc3589x.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'drivers') diff --git a/drivers/gpio/gpio-tc3589x.c b/drivers/gpio/gpio-tc3589x.c index 537a4335ddec..5a5a6cb00eea 100644 --- a/drivers/gpio/gpio-tc3589x.c +++ b/drivers/gpio/gpio-tc3589x.c @@ -34,7 +34,7 @@ struct tc3589x_gpio { u8 oldregs[CACHE_NR_REGS][CACHE_NR_BANKS]; }; -static int tc3589x_gpio_get(struct gpio_chip *chip, unsigned offset) +static int tc3589x_gpio_get(struct gpio_chip *chip, unsigned int offset) { struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip); struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; @@ -49,24 +49,24 @@ static int tc3589x_gpio_get(struct gpio_chip *chip, unsigned offset) return !!(ret & mask); } -static void tc3589x_gpio_set(struct gpio_chip *chip, unsigned offset, int val) +static void tc3589x_gpio_set(struct gpio_chip *chip, unsigned int offset, int val) { struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip); struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; u8 reg = TC3589x_GPIODATA0 + (offset / 8) * 2; - unsigned pos = offset % 8; + unsigned int pos = offset % 8; u8 data[] = {val ? BIT(pos) : 0, BIT(pos)}; tc3589x_block_write(tc3589x, reg, ARRAY_SIZE(data), data); } static int tc3589x_gpio_direction_output(struct gpio_chip *chip, - unsigned offset, int val) + unsigned int offset, int val) { struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip); struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; u8 reg = TC3589x_GPIODIR0 + offset / 8; - unsigned pos = offset % 8; + unsigned int pos = offset % 8; tc3589x_gpio_set(chip, offset, val); @@ -74,23 +74,23 @@ static int tc3589x_gpio_direction_output(struct gpio_chip *chip, } static int tc3589x_gpio_direction_input(struct gpio_chip *chip, - unsigned offset) + unsigned int offset) { struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip); struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; u8 reg = TC3589x_GPIODIR0 + offset / 8; - unsigned pos = offset % 8; + unsigned int pos = offset % 8; return tc3589x_set_bits(tc3589x, reg, BIT(pos), 0); } static int tc3589x_gpio_get_direction(struct gpio_chip *chip, - unsigned offset) + unsigned int offset) { struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip); struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; u8 reg = TC3589x_GPIODIR0 + offset / 8; - unsigned pos = offset % 8; + unsigned int pos = offset % 8; int ret; ret = tc3589x_reg_read(tc3589x, reg); @@ -101,7 +101,7 @@ static int tc3589x_gpio_get_direction(struct gpio_chip *chip, } static int tc3589x_gpio_set_single_ended(struct gpio_chip *chip, - unsigned offset, + unsigned int offset, enum single_ended_mode mode) { struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip); @@ -113,7 +113,7 @@ static int tc3589x_gpio_set_single_ended(struct gpio_chip *chip, */ u8 odmreg = TC3589x_GPIOODM0 + (offset / 8) * 2; u8 odereg = TC3589x_GPIOODE0 + (offset / 8) * 2; - unsigned pos = offset % 8; + unsigned int pos = offset % 8; int ret; switch(mode) { -- cgit v1.2.3-59-g8ed1b