diff options
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/net/usbnet.c | 8 | ||||
-rw-r--r-- | drivers/usb/net/usbnet.h | 1 |
2 files changed, 6 insertions, 3 deletions
diff --git a/drivers/usb/net/usbnet.c b/drivers/usb/net/usbnet.c index 0c5465a7909b..f9cd42d058b0 100644 --- a/drivers/usb/net/usbnet.c +++ b/drivers/usb/net/usbnet.c | |||
@@ -734,8 +734,7 @@ void usbnet_get_drvinfo (struct net_device *net, struct ethtool_drvinfo *info) | |||
734 | { | 734 | { |
735 | struct usbnet *dev = netdev_priv(net); | 735 | struct usbnet *dev = netdev_priv(net); |
736 | 736 | ||
737 | /* REVISIT don't always return "usbnet" */ | 737 | strncpy (info->driver, dev->driver_name, sizeof info->driver); |
738 | strncpy (info->driver, driver_name, sizeof info->driver); | ||
739 | strncpy (info->version, DRIVER_VERSION, sizeof info->version); | 738 | strncpy (info->version, DRIVER_VERSION, sizeof info->version); |
740 | strncpy (info->fw_version, dev->driver_info->description, | 739 | strncpy (info->fw_version, dev->driver_info->description, |
741 | sizeof info->fw_version); | 740 | sizeof info->fw_version); |
@@ -1115,10 +1114,12 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) | |||
1115 | struct driver_info *info; | 1114 | struct driver_info *info; |
1116 | struct usb_device *xdev; | 1115 | struct usb_device *xdev; |
1117 | int status; | 1116 | int status; |
1117 | const char *name; | ||
1118 | 1118 | ||
1119 | name = udev->dev.driver->name; | ||
1119 | info = (struct driver_info *) prod->driver_info; | 1120 | info = (struct driver_info *) prod->driver_info; |
1120 | if (!info) { | 1121 | if (!info) { |
1121 | dev_dbg (&udev->dev, "blacklisted by %s\n", driver_name); | 1122 | dev_dbg (&udev->dev, "blacklisted by %s\n", name); |
1122 | return -ENODEV; | 1123 | return -ENODEV; |
1123 | } | 1124 | } |
1124 | xdev = interface_to_usbdev (udev); | 1125 | xdev = interface_to_usbdev (udev); |
@@ -1138,6 +1139,7 @@ usbnet_probe (struct usb_interface *udev, const struct usb_device_id *prod) | |||
1138 | dev = netdev_priv(net); | 1139 | dev = netdev_priv(net); |
1139 | dev->udev = xdev; | 1140 | dev->udev = xdev; |
1140 | dev->driver_info = info; | 1141 | dev->driver_info = info; |
1142 | dev->driver_name = name; | ||
1141 | dev->msg_enable = netif_msg_init (msg_level, NETIF_MSG_DRV | 1143 | dev->msg_enable = netif_msg_init (msg_level, NETIF_MSG_DRV |
1142 | | NETIF_MSG_PROBE | NETIF_MSG_LINK); | 1144 | | NETIF_MSG_PROBE | NETIF_MSG_LINK); |
1143 | skb_queue_head_init (&dev->rxq); | 1145 | skb_queue_head_init (&dev->rxq); |
diff --git a/drivers/usb/net/usbnet.h b/drivers/usb/net/usbnet.h index 07c70abbe0ec..cbb53e065d6c 100644 --- a/drivers/usb/net/usbnet.h +++ b/drivers/usb/net/usbnet.h | |||
@@ -29,6 +29,7 @@ struct usbnet { | |||
29 | /* housekeeping */ | 29 | /* housekeeping */ |
30 | struct usb_device *udev; | 30 | struct usb_device *udev; |
31 | struct driver_info *driver_info; | 31 | struct driver_info *driver_info; |
32 | const char *driver_name; | ||
32 | wait_queue_head_t *wait; | 33 | wait_queue_head_t *wait; |
33 | struct mutex phy_mutex; | 34 | struct mutex phy_mutex; |
34 | 35 | ||