diff mbox

smc91x: fix compile error when SMC_DEBUG >= 2

Message ID 1397879250-32041-1-git-send-email-zlim.lnx@gmail.com
State New
Headers show

Commit Message

Zi Shen Lim April 19, 2014, 3:47 a.m. UTC
When SMC_DEBUG >= 2, we hit the following compilation error:

drivers/net/ethernet/smsc/smc91x.c:85:0:
drivers/net/ethernet/smsc/smc91x.c: In function ‘smc_findirq’:
drivers/net/ethernet/smsc/smc91x.c:1784:9: error: ‘dev’ undeclared (first use in this function)
  DBG(2, dev, "%s: %s\n", CARDNAME, __func__);
         ^
Fix it by passing in the appropriate netdev pointer.

Signed-off-by: Zi Shen Lim <zlim.lnx@gmail.com>
---
 drivers/net/ethernet/smsc/smc91x.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

David Miller April 23, 2014, 1:20 a.m. UTC | #1
From: Zi Shen Lim <zlim.lnx@gmail.com>

Date: Fri, 18 Apr 2014 20:47:30 -0700

> When SMC_DEBUG >= 2, we hit the following compilation error:

> 

> drivers/net/ethernet/smsc/smc91x.c:85:0:

> drivers/net/ethernet/smsc/smc91x.c: In function ‘smc_findirq’:

> drivers/net/ethernet/smsc/smc91x.c:1784:9: error: ‘dev’ undeclared (first use in this function)

>   DBG(2, dev, "%s: %s\n", CARDNAME, __func__);

>          ^

> Fix it by passing in the appropriate netdev pointer.

> 

> Signed-off-by: Zi Shen Lim <zlim.lnx@gmail.com>


Applied, thanks.
diff mbox

Patch

diff --git a/drivers/net/ethernet/smsc/smc91x.c b/drivers/net/ethernet/smsc/smc91x.c
index d1b4dca..597909f 100644
--- a/drivers/net/ethernet/smsc/smc91x.c
+++ b/drivers/net/ethernet/smsc/smc91x.c
@@ -1781,7 +1781,7 @@  static int smc_findirq(struct smc_local *lp)
 	int timeout = 20;
 	unsigned long cookie;
 
-	DBG(2, dev, "%s: %s\n", CARDNAME, __func__);
+	DBG(2, lp->dev, "%s: %s\n", CARDNAME, __func__);
 
 	cookie = probe_irq_on();