Skip to content

Commit ae84f15

Browse files
Abanoub8andy-shev
authored andcommitted
gpio: ich: changed every 'unsigned' to 'unsigned int'
Changed 'unsigned' to 'unsigned int'. This makes the code more uniform, and compliant with the kernel coding style. Signed-off-by: Abanoub Sameh <[email protected]> Signed-off-by: Andy Shevchenko <[email protected]>
1 parent 22f61d4 commit ae84f15

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

drivers/gpio/gpio-ich.c

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ struct ichx_desc {
7474
u32 use_sel_ignore[3];
7575

7676
/* Some chipsets have quirks, let these use their own request/get */
77-
int (*request)(struct gpio_chip *chip, unsigned offset);
78-
int (*get)(struct gpio_chip *chip, unsigned offset);
77+
int (*request)(struct gpio_chip *chip, unsigned int offset);
78+
int (*get)(struct gpio_chip *chip, unsigned int offset);
7979

8080
/*
8181
* Some chipsets don't let reading output values on GPIO_LVL register
@@ -100,7 +100,7 @@ static int modparam_gpiobase = -1; /* dynamic */
100100
module_param_named(gpiobase, modparam_gpiobase, int, 0444);
101101
MODULE_PARM_DESC(gpiobase, "The GPIO number base. -1 means dynamic, which is the default.");
102102

103-
static int ichx_write_bit(int reg, unsigned nr, int val, int verify)
103+
static int ichx_write_bit(int reg, unsigned int nr, int val, int verify)
104104
{
105105
unsigned long flags;
106106
u32 data, tmp;
@@ -132,7 +132,7 @@ static int ichx_write_bit(int reg, unsigned nr, int val, int verify)
132132
return (verify && data != tmp) ? -EPERM : 0;
133133
}
134134

135-
static int ichx_read_bit(int reg, unsigned nr)
135+
static int ichx_read_bit(int reg, unsigned int nr)
136136
{
137137
unsigned long flags;
138138
u32 data;
@@ -152,20 +152,20 @@ static int ichx_read_bit(int reg, unsigned nr)
152152
return !!(data & BIT(bit));
153153
}
154154

155-
static bool ichx_gpio_check_available(struct gpio_chip *gpio, unsigned nr)
155+
static bool ichx_gpio_check_available(struct gpio_chip *gpio, unsigned int nr)
156156
{
157157
return !!(ichx_priv.use_gpio & BIT(nr / 32));
158158
}
159159

160-
static int ichx_gpio_get_direction(struct gpio_chip *gpio, unsigned nr)
160+
static int ichx_gpio_get_direction(struct gpio_chip *gpio, unsigned int nr)
161161
{
162162
if (ichx_read_bit(GPIO_IO_SEL, nr))
163163
return GPIO_LINE_DIRECTION_IN;
164164

165165
return GPIO_LINE_DIRECTION_OUT;
166166
}
167167

168-
static int ichx_gpio_direction_input(struct gpio_chip *gpio, unsigned nr)
168+
static int ichx_gpio_direction_input(struct gpio_chip *gpio, unsigned int nr)
169169
{
170170
/*
171171
* Try setting pin as an input and verify it worked since many pins
@@ -174,7 +174,7 @@ static int ichx_gpio_direction_input(struct gpio_chip *gpio, unsigned nr)
174174
return ichx_write_bit(GPIO_IO_SEL, nr, 1, 1);
175175
}
176176

177-
static int ichx_gpio_direction_output(struct gpio_chip *gpio, unsigned nr,
177+
static int ichx_gpio_direction_output(struct gpio_chip *gpio, unsigned int nr,
178178
int val)
179179
{
180180
/* Disable blink hardware which is available for GPIOs from 0 to 31. */
@@ -191,12 +191,12 @@ static int ichx_gpio_direction_output(struct gpio_chip *gpio, unsigned nr,
191191
return ichx_write_bit(GPIO_IO_SEL, nr, 0, 1);
192192
}
193193

194-
static int ichx_gpio_get(struct gpio_chip *chip, unsigned nr)
194+
static int ichx_gpio_get(struct gpio_chip *chip, unsigned int nr)
195195
{
196196
return ichx_read_bit(GPIO_LVL, nr);
197197
}
198198

199-
static int ich6_gpio_get(struct gpio_chip *chip, unsigned nr)
199+
static int ich6_gpio_get(struct gpio_chip *chip, unsigned int nr)
200200
{
201201
unsigned long flags;
202202
u32 data;
@@ -223,7 +223,7 @@ static int ich6_gpio_get(struct gpio_chip *chip, unsigned nr)
223223
}
224224
}
225225

226-
static int ichx_gpio_request(struct gpio_chip *chip, unsigned nr)
226+
static int ichx_gpio_request(struct gpio_chip *chip, unsigned int nr)
227227
{
228228
if (!ichx_gpio_check_available(chip, nr))
229229
return -ENXIO;
@@ -240,7 +240,7 @@ static int ichx_gpio_request(struct gpio_chip *chip, unsigned nr)
240240
return ichx_read_bit(GPIO_USE_SEL, nr) ? 0 : -ENODEV;
241241
}
242242

243-
static int ich6_gpio_request(struct gpio_chip *chip, unsigned nr)
243+
static int ich6_gpio_request(struct gpio_chip *chip, unsigned int nr)
244244
{
245245
/*
246246
* Fixups for bits 16 and 17 are necessary on the Intel ICH6/3100
@@ -254,7 +254,7 @@ static int ich6_gpio_request(struct gpio_chip *chip, unsigned nr)
254254
return ichx_gpio_request(chip, nr);
255255
}
256256

257-
static void ichx_gpio_set(struct gpio_chip *chip, unsigned nr, int val)
257+
static void ichx_gpio_set(struct gpio_chip *chip, unsigned int nr, int val)
258258
{
259259
ichx_write_bit(GPIO_LVL, nr, val, 0);
260260
}

0 commit comments

Comments
 (0)