@@ -108,7 +108,7 @@ static int acpi_gpiochip_find(struct gpio_chip *gc, void *data)
108108 * controller does not have GPIO chip registered at the moment. This is to
109109 * support probe deferral.
110110 */
111- static struct gpio_desc * acpi_get_gpiod (char * path , int pin )
111+ static struct gpio_desc * acpi_get_gpiod (char * path , unsigned int pin )
112112{
113113 struct gpio_chip * chip ;
114114 acpi_handle handle ;
@@ -136,7 +136,7 @@ static struct gpio_desc *acpi_get_gpiod(char *path, int pin)
136136 * as it is intended for use outside of the GPIO layer (in a similar fashion to
137137 * gpiod_get_index() for example) it also holds a reference to the GPIO device.
138138 */
139- struct gpio_desc * acpi_get_and_request_gpiod (char * path , int pin , char * label )
139+ struct gpio_desc * acpi_get_and_request_gpiod (char * path , unsigned int pin , char * label )
140140{
141141 struct gpio_desc * gpio ;
142142 int ret ;
@@ -317,11 +317,12 @@ static struct gpio_desc *acpi_request_own_gpiod(struct gpio_chip *chip,
317317 return desc ;
318318}
319319
320- static bool acpi_gpio_in_ignore_list (const char * controller_in , int pin_in )
320+ static bool acpi_gpio_in_ignore_list (const char * controller_in , unsigned int pin_in )
321321{
322322 const char * controller , * pin_str ;
323- int len , pin ;
323+ unsigned int pin ;
324324 char * endp ;
325+ int len ;
325326
326327 controller = ignore_wake ;
327328 while (controller ) {
@@ -354,13 +355,13 @@ static bool acpi_gpio_in_ignore_list(const char *controller_in, int pin_in)
354355static bool acpi_gpio_irq_is_wake (struct device * parent ,
355356 struct acpi_resource_gpio * agpio )
356357{
357- int pin = agpio -> pin_table [0 ];
358+ unsigned int pin = agpio -> pin_table [0 ];
358359
359360 if (agpio -> wake_capable != ACPI_WAKE_CAPABLE )
360361 return false;
361362
362363 if (acpi_gpio_in_ignore_list (dev_name (parent ), pin )) {
363- dev_info (parent , "Ignoring wakeup on pin %d \n" , pin );
364+ dev_info (parent , "Ignoring wakeup on pin %u \n" , pin );
364365 return false;
365366 }
366367
@@ -378,7 +379,8 @@ static acpi_status acpi_gpiochip_alloc_event(struct acpi_resource *ares,
378379 struct acpi_gpio_event * event ;
379380 irq_handler_t handler = NULL ;
380381 struct gpio_desc * desc ;
381- int ret , pin , irq ;
382+ unsigned int pin ;
383+ int ret , irq ;
382384
383385 if (!acpi_gpio_get_irq_resource (ares , & agpio ))
384386 return AE_OK ;
@@ -387,8 +389,8 @@ static acpi_status acpi_gpiochip_alloc_event(struct acpi_resource *ares,
387389 pin = agpio -> pin_table [0 ];
388390
389391 if (pin <= 255 ) {
390- char ev_name [5 ];
391- sprintf (ev_name , "_%c%02hhX " ,
392+ char ev_name [8 ];
393+ sprintf (ev_name , "_%c%02X " ,
392394 agpio -> triggering == ACPI_EDGE_SENSITIVE ? 'E' : 'L' ,
393395 pin );
394396 if (ACPI_SUCCESS (acpi_get_handle (handle , ev_name , & evt_handle )))
@@ -1098,7 +1100,7 @@ acpi_gpio_adr_space_handler(u32 function, acpi_physical_address address,
10981100
10991101 length = min_t (u16 , agpio -> pin_table_length , pin_index + bits );
11001102 for (i = pin_index ; i < length ; ++ i ) {
1101- int pin = agpio -> pin_table [i ];
1103+ unsigned int pin = agpio -> pin_table [i ];
11021104 struct acpi_gpio_connection * conn ;
11031105 struct gpio_desc * desc ;
11041106 bool found ;
0 commit comments