[PATCH 1/4] staging: mt7621-gpio: set irq chip name only once

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



There is only one irq chip so set its name only once
in driver probe function.

Signed-off-by: Sergio Paracuellos <sergio.paracuellos@xxxxxxxxx>
---
 drivers/staging/mt7621-gpio/gpio-mt7621.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/mt7621-gpio/gpio-mt7621.c b/drivers/staging/mt7621-gpio/gpio-mt7621.c
index 281e621..06024a3 100644
--- a/drivers/staging/mt7621-gpio/gpio-mt7621.c
+++ b/drivers/staging/mt7621-gpio/gpio-mt7621.c
@@ -257,7 +257,6 @@ mediatek_gpio_bank_probe(struct platform_device *pdev,
 			return ret;
 		}
 
-		mediatek_gpio_irq_chip.name = rg->chip.label;
 		ret = gpiochip_irqchip_add(&rg->chip, &mediatek_gpio_irq_chip,
 					   0, handle_simple_irq, IRQ_TYPE_NONE);
 		if (ret) {
@@ -296,6 +295,7 @@ mediatek_gpio_probe(struct platform_device *pdev)
 	gpio_data->gpio_irq = irq_of_parse_and_map(np, 0);
 	gpio_data->dev = &pdev->dev;
 	platform_set_drvdata(pdev, gpio_data);
+	mediatek_gpio_irq_chip.name = dev_name(&pdev->dev);
 
 	for (i = 0; i < MTK_BANK_CNT; i++)
 		mediatek_gpio_bank_probe(pdev, np, i);
-- 
2.7.4

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel



[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux