diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-11-01 10:17:54 -0400 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-11-01 10:24:16 -0400 |
commit | 9e0a3169a34ba5fd04bde058a63fa0a36f2d7ed3 (patch) | |
tree | 61757133f86768e35a1540313fe48a88e18d3367 /drivers/staging/bcm/InterfaceInit.c | |
parent | 46c3790eb523931a803bb3c28c5bf8bbfc8acf48 (diff) | |
download | linux-9e0a3169a34ba5fd04bde058a63fa0a36f2d7ed3.tar.bz2 |
beceem: create class on module installation
First step to supporting multiple devices, create device class
when module is initialized.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Diffstat (limited to 'drivers/staging/bcm/InterfaceInit.c')
-rw-r--r-- | drivers/staging/bcm/InterfaceInit.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/staging/bcm/InterfaceInit.c b/drivers/staging/bcm/InterfaceInit.c index 6d62a50a2f48..161141d14565 100644 --- a/drivers/staging/bcm/InterfaceInit.c +++ b/drivers/staging/bcm/InterfaceInit.c @@ -738,6 +738,7 @@ static struct usb_driver usbbcm_driver = { .supports_autosuspend = 1, }; +struct class *bcm_class; /* Function: InterfaceInitialize @@ -755,16 +756,17 @@ Return: BCM_STATUS_SUCCESS - If Initialization of the */ INT InterfaceInitialize(void) { -// BCM_DEBUG_PRINT(Adapter,DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "Registering Usb driver!!"); + bcm_class = class_create(THIS_MODULE, DRV_NAME); + if (IS_ERR(bcm_class)) { + printk(KERN_ERR DRV_NAME ": could not create class\n"); + return PTR_ERR(bcm_class); + } return usb_register(&usbbcm_driver); } INT InterfaceExit(void) { - //PMINI_ADAPTER psAdapter = NULL; - int status = 0; - - //BCM_DEBUG_PRINT(Adapter,DBG_TYPE_INITEXIT, DRV_ENTRY, DBG_LVL_ALL, "Deregistering Usb driver!!"); + class_destroy (bcm_class); usb_deregister(&usbbcm_driver); - return status; + return 0; } |