@@ -74,8 +74,8 @@ struct ichx_desc {
74
74
u32 use_sel_ignore [3 ];
75
75
76
76
/* 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 );
79
79
80
80
/*
81
81
* Some chipsets don't let reading output values on GPIO_LVL register
@@ -100,7 +100,7 @@ static int modparam_gpiobase = -1; /* dynamic */
100
100
module_param_named (gpiobase , modparam_gpiobase , int , 0444 );
101
101
MODULE_PARM_DESC (gpiobase , "The GPIO number base. -1 means dynamic, which is the default." );
102
102
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 )
104
104
{
105
105
unsigned long flags ;
106
106
u32 data , tmp ;
@@ -132,7 +132,7 @@ static int ichx_write_bit(int reg, unsigned nr, int val, int verify)
132
132
return (verify && data != tmp ) ? - EPERM : 0 ;
133
133
}
134
134
135
- static int ichx_read_bit (int reg , unsigned nr )
135
+ static int ichx_read_bit (int reg , unsigned int nr )
136
136
{
137
137
unsigned long flags ;
138
138
u32 data ;
@@ -152,20 +152,20 @@ static int ichx_read_bit(int reg, unsigned nr)
152
152
return !!(data & BIT (bit ));
153
153
}
154
154
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 )
156
156
{
157
157
return !!(ichx_priv .use_gpio & BIT (nr / 32 ));
158
158
}
159
159
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 )
161
161
{
162
162
if (ichx_read_bit (GPIO_IO_SEL , nr ))
163
163
return GPIO_LINE_DIRECTION_IN ;
164
164
165
165
return GPIO_LINE_DIRECTION_OUT ;
166
166
}
167
167
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 )
169
169
{
170
170
/*
171
171
* 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)
174
174
return ichx_write_bit (GPIO_IO_SEL , nr , 1 , 1 );
175
175
}
176
176
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 ,
178
178
int val )
179
179
{
180
180
/* 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,
191
191
return ichx_write_bit (GPIO_IO_SEL , nr , 0 , 1 );
192
192
}
193
193
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 )
195
195
{
196
196
return ichx_read_bit (GPIO_LVL , nr );
197
197
}
198
198
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 )
200
200
{
201
201
unsigned long flags ;
202
202
u32 data ;
@@ -223,7 +223,7 @@ static int ich6_gpio_get(struct gpio_chip *chip, unsigned nr)
223
223
}
224
224
}
225
225
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 )
227
227
{
228
228
if (!ichx_gpio_check_available (chip , nr ))
229
229
return - ENXIO ;
@@ -240,7 +240,7 @@ static int ichx_gpio_request(struct gpio_chip *chip, unsigned nr)
240
240
return ichx_read_bit (GPIO_USE_SEL , nr ) ? 0 : - ENODEV ;
241
241
}
242
242
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 )
244
244
{
245
245
/*
246
246
* 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)
254
254
return ichx_gpio_request (chip , nr );
255
255
}
256
256
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 )
258
258
{
259
259
ichx_write_bit (GPIO_LVL , nr , val , 0 );
260
260
}
0 commit comments