Skip to contentSkip to conversation

i2c: tegra: set irq name as device name

PATCH In review Laxman Dewangan 2 participants 2 messages Oct 12, 2012 – Oct 13, 2012

Subsystems (3)
lore
Share & tools
lore

Laxman Dewangan

author maintainer
#0 lore raw

PATCH 1/1 i2c: tegra: set irq name as device name

When watching the irqs name of tegra i2c, all instances irq name shows as tegra_i2c.

Passing the device name properly to have the irq names with instance like tegra-i2c.0, tegra-i2c.1 etc.

---
 drivers/i2c/busses/i2c-tegra.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/i2c/busses/i2c-tegra.c +1 -1
index f981ac4..dcea77b 100644
@@ -742,7 +742,7 @@ static int __devinit tegra_i2c_probe(struct platform_device *pdev)
 	}
 
 	ret = devm_request_irq(&pdev->dev, i2c_dev->irq,
-			tegra_i2c_isr, 0, pdev->name, i2c_dev);
+			tegra_i2c_isr, 0, dev_name(&pdev->dev), i2c_dev);
 	if (ret) {
 		dev_err(&pdev->dev, "Failed to request irq %i\n", i2c_dev->irq);
 		return ret;
Signature · 1 line
1.7.1.1
Acked-by on v1 1/1
#1 lore raw
Quoted 16 lines · Laxman Dewangan

When watching the irqs name of tegra i2c, all instances irq name shows as tegra_i2c.

Passing the device name properly to have the irq names with instance like tegra-i2c.0, tegra-i2c.1 etc.

---
 drivers/i2c/busses/i2c-tegra.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/i2c/busses/i2c-tegra.c +0 -0
index f981ac4..dcea77b 100644

drivers/i2c/busses/i2c-tegra.c static int __devinit tegra_i2c_probe(struct platform_device *pdev) · line 748

Quoted 8 lines
drivers/i2c/busses/i2c-tegra.c +1 -1
@@ -742,7 +742,7 @@ static int __devinit tegra_i2c_probe(struct platform_device *pdev)
 	}
 
 	ret = devm_request_irq(&pdev->dev, i2c_dev->irq,
-			tegra_i2c_isr, 0, pdev->name, i2c_dev);
+			tegra_i2c_isr, 0, dev_name(&pdev->dev), i2c_dev);
 	if (ret) {
 		dev_err(&pdev->dev, "Failed to request irq %i\n", i2c_dev->irq);
 		return ret;

Good idea.

Signature · 1 line
Jean Delvare