e1000e: fix debugging printout code
authorAuke Kok <auke-jan.h.kok@intel.com>
Thu, 4 Oct 2007 18:38:43 +0000 (11:38 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Wed, 10 Oct 2007 23:54:42 +0000 (16:54 -0700)
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>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
drivers/net/e1000e/hw.h
drivers/net/e1000e/netdev.c

index 848217a..aa82f1a 100644 (file)
@@ -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, ...)
index 4a21d7d..3a0bb2a 100644 (file)
@@ -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