beceem: add module information
authorStephen Hemminger <stephen.hemminger@vyatta.com>
Fri, 29 Oct 2010 14:44:45 +0000 (07:44 -0700)
committerStephen Hemminger <stephen.hemminger@vyatta.com>
Sat, 30 Oct 2010 03:43:23 +0000 (20:43 -0700)
Add description and version information to the driver.
Make USB device table exported as alias so device will be
autoloaded. Get rid of useless noise message on boot.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
drivers/staging/bcm/Bcmnet.c
drivers/staging/bcm/InterfaceInit.c

index bc296982142132ad6384d13a0e84a3be24bf837b..4d7d8cd4bf43313baa47390b35ba226875e4c8d9 100644 (file)
@@ -1,5 +1,9 @@
 #include "headers.h"
 
+#define DRV_DESCRIPTION "Beceem Communications Inc. WiMAX driver"
+#define DRV_VERSION    "5.2.7.3P1"
+#define DRV_COPYRIGHT  "Copyright 2010. Beceem Communications Inc"
+
 static INT bcm_notify_event(struct notifier_block *nb, ULONG event, PVOID dev)
 {
        struct net_device *ndev = (struct net_device*)dev;
@@ -236,29 +240,22 @@ void bcm_unregister_networkdev(PMINI_ADAPTER Adapter)
 
 static int bcm_init(void)
 {
-       int result;
-       result = InterfaceInitialize();
-       if(result)
-       {
-               printk("Initialisation failed for usbbcm");
-       }
-       else
-       {
-               printk("Initialised usbbcm");
-       }
-       return result;
+       printk(KERN_INFO "%s, %s\n", DRV_DESCRIPTION, DRV_VERSION);
+       printk(KERN_INFO "%s\n", DRV_COPYRIGHT);
+
+       return InterfaceInitialize();
 }
 
 
 static void bcm_exit(void)
 {
-    printk("%s %s Calling InterfaceExit\n",__FILE__, __FUNCTION__);
        InterfaceExit();
-    printk("%s %s InterfaceExit returned\n",__FILE__, __FUNCTION__);
 }
 
 module_init(bcm_init);
 module_exit(bcm_exit);
-MODULE_LICENSE ("GPL");
 
+MODULE_DESCRIPTION(DRV_DESCRIPTION);
+MODULE_VERSION(DRV_VERSION);
+MODULE_LICENSE ("GPL");
 
index 824f9a45007aa8aebf65852ffb172e69eae95981..e6d1dc0d3e4322b3002ce2d44b2a7a1c7e0ae6f3 100644 (file)
@@ -2,12 +2,14 @@
 
 static struct usb_device_id InterfaceUsbtable[] = {
     { USB_DEVICE(BCM_USB_VENDOR_ID_T3, BCM_USB_PRODUCT_ID_T3) },
-       { USB_DEVICE(BCM_USB_VENDOR_ID_T3, BCM_USB_PRODUCT_ID_T3B) },
-       { USB_DEVICE(BCM_USB_VENDOR_ID_T3, BCM_USB_PRODUCT_ID_T3L) },
-       { USB_DEVICE(BCM_USB_VENDOR_ID_ZTE, BCM_USB_PRODUCT_ID_226) },
-       { USB_DEVICE(BCM_USB_VENDOR_ID_FOXCONN, BCM_USB_PRODUCT_ID_1901) },
-    {}
+    { USB_DEVICE(BCM_USB_VENDOR_ID_T3, BCM_USB_PRODUCT_ID_T3B) },
+    { USB_DEVICE(BCM_USB_VENDOR_ID_T3, BCM_USB_PRODUCT_ID_T3L) },
+    { USB_DEVICE(BCM_USB_VENDOR_ID_ZTE, BCM_USB_PRODUCT_ID_226) },
+    { USB_DEVICE(BCM_USB_VENDOR_ID_FOXCONN, BCM_USB_PRODUCT_ID_1901) },
+
+    { }
 };
+MODULE_DEVICE_TABLE(usb, InterfaceUsbtable);
 
 VOID InterfaceAdapterFree(PS_INTERFACE_ADAPTER psIntfAdapter)
 {
@@ -865,4 +867,3 @@ INT InterfaceExit(void)
        usb_deregister(&usbbcm_driver);
        return status;
 }
-MODULE_LICENSE ("GPL");