[PATCH RESEND 2/2] can: mcp251x: Use dev_name() during request_threaded_irq()

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

 



Passing driver name as name during request_threaded_irq() results in all
CAN IRQs have same name. This does not help much to easily identify which
IRQ belongs to which CAN instance. Therefore pass dev_name() during
request_threaded_irq() so that better identifiable name is listed for
CAN devices in cat /proc/interrupts output.

Output of cat /proc/interrupts
Before this patch:
  253:          2  gpio-mxc  13 Edge      mcp251x
  259:          2  gpio-mxc  19 Edge      mcp251x
After this patch:
  253:          2  gpio-mxc  13 Edge      spi1.1
  259:          2  gpio-mxc  19 Edge      spi1.2

Signed-off-by: Alexander Shiyan <shc_work@xxxxxxx>
---
 drivers/net/can/spi/mcp251x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/can/spi/mcp251x.c b/drivers/net/can/spi/mcp251x.c
index bb698c1c04ba..409a13a413f5 100644
--- a/drivers/net/can/spi/mcp251x.c
+++ b/drivers/net/can/spi/mcp251x.c
@@ -952,7 +952,7 @@ static int mcp251x_open(struct net_device *net)
 
 	ret = request_threaded_irq(spi->irq, NULL, mcp251x_can_ist,
 				   IRQF_ONESHOT | IRQF_TRIGGER_FALLING,
-				   DEVICE_NAME, priv);
+				   dev_name(&spi->dev), priv);
 	if (ret) {
 		dev_err(&spi->dev, "failed to acquire irq %d\n", spi->irq);
 		mcp251x_power_enable(priv->transceiver, 0);
-- 
2.13.0




[Index of Archives]     [Automotive Discussions]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]     [CAN Bus]

  Powered by Linux