aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2016-09-19 04:14:29 -0400
committerLinus Walleij <linus.walleij@linaro.org>2016-09-19 04:14:29 -0400
commit0e4011ebbc1bee52fd65b1cba5da6fddbd588377 (patch)
treea17edb2a0e1564f4892927d0ca5660f598a23253
parent14063d71e5e6775c676755612fc81deb029685c4 (diff)
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 <linus.walleij@linaro.org>
-rw-r--r--drivers/gpio/gpio-tc3589x.c22
1 files changed, 11 insertions, 11 deletions
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 {
34 u8 oldregs[CACHE_NR_REGS][CACHE_NR_BANKS]; 34 u8 oldregs[CACHE_NR_REGS][CACHE_NR_BANKS];
35}; 35};
36 36
37static int tc3589x_gpio_get(struct gpio_chip *chip, unsigned offset) 37static int tc3589x_gpio_get(struct gpio_chip *chip, unsigned int offset)
38{ 38{
39 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip); 39 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip);
40 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; 40 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x;
@@ -49,24 +49,24 @@ static int tc3589x_gpio_get(struct gpio_chip *chip, unsigned offset)
49 return !!(ret & mask); 49 return !!(ret & mask);
50} 50}
51 51
52static void tc3589x_gpio_set(struct gpio_chip *chip, unsigned offset, int val) 52static void tc3589x_gpio_set(struct gpio_chip *chip, unsigned int offset, int val)
53{ 53{
54 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip); 54 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip);
55 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; 55 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x;
56 u8 reg = TC3589x_GPIODATA0 + (offset / 8) * 2; 56 u8 reg = TC3589x_GPIODATA0 + (offset / 8) * 2;
57 unsigned pos = offset % 8; 57 unsigned int pos = offset % 8;
58 u8 data[] = {val ? BIT(pos) : 0, BIT(pos)}; 58 u8 data[] = {val ? BIT(pos) : 0, BIT(pos)};
59 59
60 tc3589x_block_write(tc3589x, reg, ARRAY_SIZE(data), data); 60 tc3589x_block_write(tc3589x, reg, ARRAY_SIZE(data), data);
61} 61}
62 62
63static int tc3589x_gpio_direction_output(struct gpio_chip *chip, 63static int tc3589x_gpio_direction_output(struct gpio_chip *chip,
64 unsigned offset, int val) 64 unsigned int offset, int val)
65{ 65{
66 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip); 66 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip);
67 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; 67 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x;
68 u8 reg = TC3589x_GPIODIR0 + offset / 8; 68 u8 reg = TC3589x_GPIODIR0 + offset / 8;
69 unsigned pos = offset % 8; 69 unsigned int pos = offset % 8;
70 70
71 tc3589x_gpio_set(chip, offset, val); 71 tc3589x_gpio_set(chip, offset, val);
72 72
@@ -74,23 +74,23 @@ static int tc3589x_gpio_direction_output(struct gpio_chip *chip,
74} 74}
75 75
76static int tc3589x_gpio_direction_input(struct gpio_chip *chip, 76static int tc3589x_gpio_direction_input(struct gpio_chip *chip,
77 unsigned offset) 77 unsigned int offset)
78{ 78{
79 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip); 79 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip);
80 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; 80 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x;
81 u8 reg = TC3589x_GPIODIR0 + offset / 8; 81 u8 reg = TC3589x_GPIODIR0 + offset / 8;
82 unsigned pos = offset % 8; 82 unsigned int pos = offset % 8;
83 83
84 return tc3589x_set_bits(tc3589x, reg, BIT(pos), 0); 84 return tc3589x_set_bits(tc3589x, reg, BIT(pos), 0);
85} 85}
86 86
87static int tc3589x_gpio_get_direction(struct gpio_chip *chip, 87static int tc3589x_gpio_get_direction(struct gpio_chip *chip,
88 unsigned offset) 88 unsigned int offset)
89{ 89{
90 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip); 90 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip);
91 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x; 91 struct tc3589x *tc3589x = tc3589x_gpio->tc3589x;
92 u8 reg = TC3589x_GPIODIR0 + offset / 8; 92 u8 reg = TC3589x_GPIODIR0 + offset / 8;
93 unsigned pos = offset % 8; 93 unsigned int pos = offset % 8;
94 int ret; 94 int ret;
95 95
96 ret = tc3589x_reg_read(tc3589x, reg); 96 ret = tc3589x_reg_read(tc3589x, reg);
@@ -101,7 +101,7 @@ static int tc3589x_gpio_get_direction(struct gpio_chip *chip,
101} 101}
102 102
103static int tc3589x_gpio_set_single_ended(struct gpio_chip *chip, 103static int tc3589x_gpio_set_single_ended(struct gpio_chip *chip,
104 unsigned offset, 104 unsigned int offset,
105 enum single_ended_mode mode) 105 enum single_ended_mode mode)
106{ 106{
107 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip); 107 struct tc3589x_gpio *tc3589x_gpio = gpiochip_get_data(chip);
@@ -113,7 +113,7 @@ static int tc3589x_gpio_set_single_ended(struct gpio_chip *chip,
113 */ 113 */
114 u8 odmreg = TC3589x_GPIOODM0 + (offset / 8) * 2; 114 u8 odmreg = TC3589x_GPIOODM0 + (offset / 8) * 2;
115 u8 odereg = TC3589x_GPIOODE0 + (offset / 8) * 2; 115 u8 odereg = TC3589x_GPIOODE0 + (offset / 8) * 2;
116 unsigned pos = offset % 8; 116 unsigned int pos = offset % 8;
117 int ret; 117 int ret;
118 118
119 switch(mode) { 119 switch(mode) {