Commit 68c6a003 authored by Daniele Bellucci's avatar Daniele Bellucci Committed by Greg Kroah-Hartman

[PATCH] Audit and minor cleanups in drivers/usb/*

- if usb_register fails report back its return code rather than -1
- static declarations for module_init/cleanup functions
- adding missing __init/__exit for module_init/cleanup functions
parent b89ed155
...@@ -342,18 +342,21 @@ static struct usb_driver lcd_driver = { ...@@ -342,18 +342,21 @@ static struct usb_driver lcd_driver = {
.id_table = id_table, .id_table = id_table,
}; };
int usb_lcd_init(void) static int __init usb_lcd_init(void)
{ {
if (usb_register(&lcd_driver) < 0) int retval;
return -1; retval = usb_register(&lcd_driver);
if (retval)
goto out;
info("%s (C) Adams IT Services http://www.usblcd.de", DRIVER_VERSION); info("%s (C) Adams IT Services http://www.usblcd.de", DRIVER_VERSION);
info("USBLCD support registered."); info("USBLCD support registered.");
return 0; out:
return retval;
} }
void usb_lcd_cleanup(void) static void __exit usb_lcd_cleanup(void)
{ {
struct lcd_usb_data *lcd = &lcd_instance; struct lcd_usb_data *lcd = &lcd_instance;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment