diff mbox

[3/6] smsc95xx: add constant definition for SMSC USB vendor id

Message ID 1268245959-13861-4-git-send-email-steve.glendinning@smsc.com
State Changes Requested, archived
Delegated to: David Miller
Headers show

Commit Message

Steve Glendinning March 10, 2010, 6:32 p.m. UTC
Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>
---
 drivers/net/usb/smsc95xx.c |   31 ++++++++++++++++---------------
 1 files changed, 16 insertions(+), 15 deletions(-)

Comments

David Miller March 15, 2010, 10:39 p.m. UTC | #1
From: Steve Glendinning <steve.glendinning@smsc.com>
Date: Wed, 10 Mar 2010 18:32:36 +0000

> Signed-off-by: Steve Glendinning <steve.glendinning@smsc.com>

I don't see any real need for this, really.  It's a constant,
device ID tables are constants and people know how to go lookup
a vendor ID if they really want to know who it is.  This doesn't
add any readability to the driver at all.

Also you're mixing cleanups and bug fixes into your patch
set.  Please seperate out the pure bug fixes so I can apply
them to net-2.6  The rest can go in later when net-next-2.6
opens up.
--
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
diff mbox

Patch

diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c
index a2cb77d..a55dc27 100644
--- a/drivers/net/usb/smsc95xx.c
+++ b/drivers/net/usb/smsc95xx.c
@@ -45,6 +45,7 @@ 
 #define SMSC95XX_INTERNAL_PHY_ID	(1)
 #define SMSC95XX_TX_OVERHEAD		(8)
 #define SMSC95XX_TX_OVERHEAD_CSUM	(12)
+#define USB_VENDOR_ID_SMSC		(0x0424)
 
 struct smsc95xx_priv {
 	u32 mac_cr;
@@ -1225,77 +1226,77 @@  static const struct driver_info smsc95xx_info = {
 static const struct usb_device_id products[] = {
 	{
 		/* SMSC9500 USB Ethernet Device */
-		USB_DEVICE(0x0424, 0x9500),
+		USB_DEVICE(USB_VENDOR_ID_SMSC, 0x9500),
 		.driver_info = (unsigned long) &smsc95xx_info,
 	},
 	{
 		/* SMSC9505 USB Ethernet Device */
-		USB_DEVICE(0x0424, 0x9505),
+		USB_DEVICE(USB_VENDOR_ID_SMSC, 0x9505),
 		.driver_info = (unsigned long) &smsc95xx_info,
 	},
 	{
 		/* SMSC9500A USB Ethernet Device */
-		USB_DEVICE(0x0424, 0x9E00),
+		USB_DEVICE(USB_VENDOR_ID_SMSC, 0x9E00),
 		.driver_info = (unsigned long) &smsc95xx_info,
 	},
 	{
 		/* SMSC9505A USB Ethernet Device */
-		USB_DEVICE(0x0424, 0x9E01),
+		USB_DEVICE(USB_VENDOR_ID_SMSC, 0x9E01),
 		.driver_info = (unsigned long) &smsc95xx_info,
 	},
 	{
 		/* SMSC9512/9514 USB Hub & Ethernet Device */
-		USB_DEVICE(0x0424, 0xec00),
+		USB_DEVICE(USB_VENDOR_ID_SMSC, 0xec00),
 		.driver_info = (unsigned long) &smsc95xx_info,
 	},
 	{
 		/* SMSC9500 USB Ethernet Device (SAL10) */
-		USB_DEVICE(0x0424, 0x9900),
+		USB_DEVICE(USB_VENDOR_ID_SMSC, 0x9900),
 		.driver_info = (unsigned long) &smsc95xx_info,
 	},
 	{
 		/* SMSC9505 USB Ethernet Device (SAL10) */
-		USB_DEVICE(0x0424, 0x9901),
+		USB_DEVICE(USB_VENDOR_ID_SMSC, 0x9901),
 		.driver_info = (unsigned long) &smsc95xx_info,
 	},
 	{
 		/* SMSC9500A USB Ethernet Device (SAL10) */
-		USB_DEVICE(0x0424, 0x9902),
+		USB_DEVICE(USB_VENDOR_ID_SMSC, 0x9902),
 		.driver_info = (unsigned long) &smsc95xx_info,
 	},
 	{
 		/* SMSC9505A USB Ethernet Device (SAL10) */
-		USB_DEVICE(0x0424, 0x9903),
+		USB_DEVICE(USB_VENDOR_ID_SMSC, 0x9903),
 		.driver_info = (unsigned long) &smsc95xx_info,
 	},
 	{
 		/* SMSC9512/9514 USB Hub & Ethernet Device (SAL10) */
-		USB_DEVICE(0x0424, 0x9904),
+		USB_DEVICE(USB_VENDOR_ID_SMSC, 0x9904),
 		.driver_info = (unsigned long) &smsc95xx_info,
 	},
 	{
 		/* SMSC9500A USB Ethernet Device (HAL) */
-		USB_DEVICE(0x0424, 0x9905),
+		USB_DEVICE(USB_VENDOR_ID_SMSC, 0x9905),
 		.driver_info = (unsigned long) &smsc95xx_info,
 	},
 	{
 		/* SMSC9505A USB Ethernet Device (HAL) */
-		USB_DEVICE(0x0424, 0x9906),
+		USB_DEVICE(USB_VENDOR_ID_SMSC, 0x9906),
 		.driver_info = (unsigned long) &smsc95xx_info,
 	},
 	{
 		/* SMSC9500 USB Ethernet Device (Alternate ID) */
-		USB_DEVICE(0x0424, 0x9907),
+		USB_DEVICE(USB_VENDOR_ID_SMSC, 0x9907),
 		.driver_info = (unsigned long) &smsc95xx_info,
 	},
 	{
 		/* SMSC9500A USB Ethernet Device (Alternate ID) */
-		USB_DEVICE(0x0424, 0x9908),
+		USB_DEVICE(USB_VENDOR_ID_SMSC, 0x9908),
 		.driver_info = (unsigned long) &smsc95xx_info,
 	},
 	{
 		/* SMSC9512/9514 USB Hub & Ethernet Device (Alternate ID) */
-		USB_DEVICE(0x0424, 0x9909),
+		USB_DEVICE(USB_VENDOR_ID_SMSC, 0x9909),
 		.driver_info = (unsigned long) &smsc95xx_info,
 	},
 	{ },		/* END */