aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-01-30 15:30:48 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-04-03 14:53:37 -0700
commit085c0904af64bfe9edaf9011facb0d2daea105bf (patch)
tree743c135fe3816e10ef936614c0ddd3f0bb0181a2 /drivers
parentc725e43a546381019bb5094718ac25c10ac83e15 (diff)
Staging: aten2011: clean up init and exit functions
This makes them smaller, and fixes the name of the serial driver structure. Cc: Russell Lang <gsview@ghostgum.com.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/uc2322/aten2011.c39
1 files changed, 9 insertions, 30 deletions
diff --git a/drivers/staging/uc2322/aten2011.c b/drivers/staging/uc2322/aten2011.c
index 6b4c80834d8..8fe5044f8d1 100644
--- a/drivers/staging/uc2322/aten2011.c
+++ b/drivers/staging/uc2322/aten2011.c
@@ -2858,7 +2858,7 @@ static struct usb_serial *ATEN2011_get_usb_serial(struct usb_serial_port *port,
return port->serial;
}
-static struct usb_serial_driver ATENINTL2011_4port_device = {
+static struct usb_serial_driver aten_serial_driver = {
.driver = {
.owner = THIS_MODULE,
.name = "aten2011",
@@ -2892,55 +2892,34 @@ static struct usb_driver aten_driver = {
.id_table = id_table,
};
-static int __init ATENINTL2011_init(void)
+static int __init aten_init(void)
{
int retval;
- DPRINTK("%s \n", " ATEN2011_init :entering..........");
-
/* Register with the usb serial */
- retval = usb_serial_register(&ATENINTL2011_4port_device);
-
+ retval = usb_serial_register(&aten_serial_driver);
if (retval)
- goto failed_port_device_register;
+ return retval;
-/* info(DRIVER_DESC " " DRIVER_VERSION); */
printk(KERN_INFO KBUILD_MODNAME ":"
DRIVER_DESC " " DRIVER_VERSION "\n");
/* Register with the usb */
retval = usb_register(&aten_driver);
-
if (retval)
- goto failed_usb_register;
-
- if (retval == 0) {
- DPRINTK("%s\n", "Leaving...");
- return 0;
- }
-
- failed_usb_register:
- usb_serial_deregister(&ATENINTL2011_4port_device);
-
- failed_port_device_register:
+ usb_serial_deregister(&aten_serial_driver);
return retval;
}
-static void __exit ATENINTL2011_exit(void)
+static void __exit aten_exit(void)
{
-
- DPRINTK("%s \n", " ATEN2011_exit :entering..........");
-
usb_deregister(&aten_driver);
-
- usb_serial_deregister(&ATENINTL2011_4port_device);
-
- DPRINTK("%s\n", "End...");
+ usb_serial_deregister(&aten_serial_driver);
}
-module_init(ATENINTL2011_init);
-module_exit(ATENINTL2011_exit);
+module_init(aten_init);
+module_exit(aten_exit);
/* Module information */
MODULE_DESCRIPTION(DRIVER_DESC);