[PATCH] e1000e: fix debugging printout code

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Auke Kok
Date: Thursday, October 4, 2007 - 11:38 am

A small bug crawled in the -DDEBUG enabled code. Fix this to
properly call the backreference device name.

Signed-off-by: Auke Kok <auke-jan.h.kok@intel.com>
---

 drivers/net/e1000e/hw.h     |    2 +-
 drivers/net/e1000e/netdev.c |    4 +---
 2 files changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/net/e1000e/hw.h b/drivers/net/e1000e/hw.h
index 848217a..aa82f1a 100644
--- a/drivers/net/e1000e/hw.h
+++ b/drivers/net/e1000e/hw.h
@@ -852,7 +852,7 @@ struct e1000_hw {
 
 #ifdef DEBUG
 #define hw_dbg(hw, format, arg...) \
-	printk(KERN_DEBUG, "%s: " format, e1000_get_hw_dev_name(hw), ##arg);
+	printk(KERN_DEBUG, "%s: " format, e1000e_get_hw_dev_name(hw), ##arg);
 #else
 static inline int __attribute__ ((format (printf, 2, 3)))
 hw_dbg(struct e1000_hw *hw, const char *format, ...)
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c
index 4a21d7d..3a0bb2a 100644
--- a/drivers/net/e1000e/netdev.c
+++ b/drivers/net/e1000e/netdev.c
@@ -66,9 +66,7 @@ static const struct e1000_info *e1000_info_tbl[] = {
  **/
 char *e1000e_get_hw_dev_name(struct e1000_hw *hw)
 {
-	struct e1000_adapter *adapter = hw->back;
-	struct net_device *netdev = adapter->netdev;
-	return netdev->name;
+	return hw->adapter->netdev->name;
 }
 #endif
 
-
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] e1000e: fix debugging printout code, Auke Kok, (Thu Oct 4, 11:38 am)
Re: [PATCH] e1000e: fix debugging printout code, Jeff Garzik, (Fri Oct 5, 10:53 am)
Re: [PATCH] e1000e: fix debugging printout code, Jeff Garzik, (Fri Oct 5, 10:56 am)
Re: [PATCH] e1000e: fix debugging printout code, Joe Perches, (Mon Oct 15, 9:00 am)
Re: [PATCH] e1000e: fix debugging printout code, Kok, Auke, (Mon Oct 15, 9:20 am)
Re: [PATCH] e1000e: fix debugging printout code, Joe Perches, (Mon Oct 15, 10:05 am)
Re: [PATCH] e1000e: fix debugging printout code, Kok, Auke, (Mon Oct 15, 10:32 am)