patch-2.4.22 linux-2.4.22/drivers/usb/kaweth.c

Next file: linux-2.4.22/drivers/usb/pegasus.c
Previous file: linux-2.4.22/drivers/usb/hub.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/drivers/usb/kaweth.c linux-2.4.22/drivers/usb/kaweth.c
@@ -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;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)