@@ -332,35 +332,6 @@ static struct irq_chip aspeed_gpio_irqchip = {
332
332
.irq_set_type = aspeed_gpio_set_type ,
333
333
};
334
334
335
- static void aspeed_gpio_set_names (struct aspeed_gpio * gpio )
336
- {
337
- const char format [] = "GPIOXn" ;
338
- char * namebuf , * * names ;
339
- unsigned int i ;
340
-
341
- /* our buffer of name pointers */
342
- names = devm_kmalloc_array (gpio -> chip .dev , gpio -> chip .ngpio ,
343
- sizeof (char * ), GFP_KERNEL );
344
-
345
- /* and one contiguous buffer for the names themselves */
346
- namebuf = devm_kmalloc_array (gpio -> chip .dev , gpio -> chip .ngpio ,
347
- sizeof (format ), GFP_KERNEL );
348
-
349
- for (i = 0 ; i < gpio -> chip .ngpio ; i ++ ) {
350
- struct aspeed_gpio_bank * bank = to_bank (i );
351
- char * name = namebuf + (i * sizeof (format ));
352
- int bit = GPIO_OFFSET (i );
353
-
354
- memcpy (name , format , 4 );
355
- name [4 ] = bank -> names [bit >> 3 ];
356
- name [5 ] = '0' + (bit % 8 );
357
- name [6 ] = '\0' ;
358
- names [i ] = name ;
359
- }
360
-
361
- gpio -> chip .names = (const char * const * )names ;
362
- }
363
-
364
335
static int aspeed_gpio_to_irq (struct gpio_chip * chip , unsigned offset )
365
336
{
366
337
struct aspeed_gpio * gpio = to_aspeed_gpio (chip );
@@ -427,8 +398,6 @@ static int __init aspeed_gpio_probe(struct platform_device *pdev)
427
398
gpio -> chip .label = dev_name (& pdev -> dev );
428
399
gpio -> chip .base = -1 ;
429
400
430
- aspeed_gpio_set_names (gpio );
431
-
432
401
platform_set_drvdata (pdev , gpio );
433
402
434
403
rc = gpiochip_add (& gpio -> chip );
0 commit comments