ChangeSet 1.1256, 2003/06/18 16:55:36-07:00, [EMAIL PROTECTED]

[PATCH] USB: incorrect ethtool -i driver name

This converts 2.4 to use driver_name


 drivers/usb/CDCEther.c |    5 +++--
 drivers/usb/catc.c     |    6 ++++--
 drivers/usb/kaweth.c   |    6 ++++--
 drivers/usb/rtl8150.c  |    6 ++++--
 4 files changed, 15 insertions(+), 8 deletions(-)


diff -Nru a/drivers/usb/CDCEther.c b/drivers/usb/CDCEther.c
--- a/drivers/usb/CDCEther.c    Wed Jun 18 17:34:54 2003
+++ b/drivers/usb/CDCEther.c    Wed Jun 18 17:34:54 2003
@@ -37,6 +37,7 @@
 #define SHORT_DRIVER_DESC "CDC Ethernet Class"
 #define DRIVER_VERSION "0.98.6"
 
+static const char driver_name[] = "CDCEther";
 static const char *version = __FILE__ ": " DRIVER_VERSION " 7 Jan 2002 Brad Hards and 
another";
 // We only try to claim CDC Ethernet model devices */
 static struct usb_device_id CDCEther_ids[] = {
@@ -460,7 +461,7 @@
        /* get driver info */
        case ETHTOOL_GDRVINFO: {
        struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
-               strncpy(info.driver, "CDCEther", ETHTOOL_BUSINFO_LEN);
+               strncpy(info.driver, driver_name, ETHTOOL_BUSINFO_LEN);
                strncpy(info.version, DRIVER_VERSION, ETHTOOL_BUSINFO_LEN);
                sprintf(tmp, "usb%d:%d", ether_dev->usb->bus->busnum, 
ether_dev->usb->devnum);
                strncpy(info.bus_info, tmp, ETHTOOL_BUSINFO_LEN);
@@ -1421,7 +1422,7 @@
 //////////////////////////////////////////////////////////////////////////////
 
 static struct usb_driver CDCEther_driver = {
-       name:           "CDCEther",
+       name:           driver_name,
        probe:          CDCEther_probe,
        disconnect:     CDCEther_disconnect,
        id_table:       CDCEther_ids,
diff -Nru a/drivers/usb/catc.c b/drivers/usb/catc.c
--- a/drivers/usb/catc.c        Wed Jun 18 17:34:54 2003
+++ b/drivers/usb/catc.c        Wed Jun 18 17:34:54 2003
@@ -62,6 +62,8 @@
 MODULE_DESCRIPTION(DRIVER_DESC);
 MODULE_LICENSE("GPL");
 
+static const char driver_name[] = "catc";
+
 /*
  * Some defines.
  */ 
@@ -674,7 +676,7 @@
         /* get driver info */
         case ETHTOOL_GDRVINFO: {
                 struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
-                strncpy(info.driver, "catc", ETHTOOL_BUSINFO_LEN);
+                strncpy(info.driver, driver_name, ETHTOOL_BUSINFO_LEN);
                 strncpy(info.version, DRIVER_VERSION, ETHTOOL_BUSINFO_LEN);
                sprintf(tmp, "usb%d:%d", catc->usbdev->bus->busnum, 
catc->usbdev->devnum);
                 strncpy(info.bus_info, tmp,ETHTOOL_BUSINFO_LEN);
@@ -937,7 +939,7 @@
 MODULE_DEVICE_TABLE(usb, catc_id_table);
 
 static struct usb_driver catc_driver = {
-       name:           "catc",
+       name:           driver_name,
        probe:          catc_probe,
        disconnect:     catc_disconnect,
        id_table:       catc_id_table,
diff -Nru a/drivers/usb/kaweth.c b/drivers/usb/kaweth.c
--- a/drivers/usb/kaweth.c      Wed Jun 18 17:34:54 2003
+++ b/drivers/usb/kaweth.c      Wed Jun 18 17:34:54 2003
@@ -114,6 +114,8 @@
 MODULE_DESCRIPTION("KL5USB101 USB Ethernet driver");
 MODULE_LICENSE("GPL");
 
+static const char driver_name[] = "kaweth";
+
 static void *kaweth_probe(
             struct usb_device *dev,             /* the device */
             unsigned ifnum,                     /* what interface */
@@ -170,7 +172,7 @@
  *     kaweth_driver
  ****************************************************************/
 static struct usb_driver kaweth_driver = {
-       .name =         "kaweth",
+       .name =         driver_name,
        .probe =        kaweth_probe,
        .disconnect =   kaweth_disconnect,
        .id_table =     usb_klsi_table,
@@ -659,7 +661,7 @@
        switch (ethcmd) {
        case ETHTOOL_GDRVINFO: {
                struct ethtool_drvinfo info = {ETHTOOL_GDRVINFO};
-               strncpy(info.driver, "kaweth", sizeof(info.driver)-1);
+               strncpy(info.driver, driver_name, sizeof(info.driver)-1);
                if (copy_to_user(useraddr, &info, sizeof(info)))
                        return -EFAULT;
                return 0;
diff -Nru a/drivers/usb/rtl8150.c b/drivers/usb/rtl8150.c
--- a/drivers/usb/rtl8150.c     Wed Jun 18 17:34:54 2003
+++ b/drivers/usb/rtl8150.c     Wed Jun 18 17:34:54 2003
@@ -111,8 +111,10 @@
 static void *rtl8150_probe(struct usb_device *dev, unsigned int ifnum,
                           const struct usb_device_id *id);
 
+static const char driver_name[] = "rtl8150";
+
 static struct usb_driver rtl8150_driver = {
-       name:           "rtl8150",
+       name:           driver_name,
        probe:          rtl8150_probe,
        disconnect:     rtl8150_disconnect,
        id_table:       rtl8150_table,
@@ -578,7 +580,7 @@
        case ETHTOOL_GDRVINFO:{
                        struct ethtool_drvinfo info = { ETHTOOL_GDRVINFO };
 
-                       strncpy(info.driver, "rtl8150", ETHTOOL_BUSINFO_LEN);
+                       strncpy(info.driver, driver_name, ETHTOOL_BUSINFO_LEN);
                        strncpy(info.version, DRIVER_VERSION,
                                ETHTOOL_BUSINFO_LEN);
                        sprintf(tmp, "usb%d:%d", dev->udev->bus->busnum,



-------------------------------------------------------
This SF.Net email is sponsored by: INetU
Attention Web Developers & Consultants: Become An INetU Hosting Partner.
Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission!
INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to