usb/misc/usb3503: Use module_i2c_driver to register driver
PATCH 1/1 usb/misc/usb3503: Use module_i2c_driver to register driver
Removing some boilerplate by using module_i2c_driver instead of calling register and unregister in the otherwise empty init/exit functions
Signed-off-by Peter Huewe <[email protected]>
--- drivers/usb/misc/usb3503.c | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-)
drivers/usb/misc/usb3503.c +1 -13
@@ -307,19 +307,7 @@ static struct i2c_driver usb3503_driver = { .id_table = usb3503_id, }; -static int __init usb3503_init (void ) -{ -return i2c_add_driver (&usb3503_driver); -} - -static void __exit usb3503_exit(void) -{ -i2c_del_driver (&usb3503_driver); -} - -module_init (usb3503_init); -module_exit (usb3503_exit); - +module_i2c_driver (usb3503_driver);MODULE_AUTHOR ("Dongjin Kim <[email protected]>" );MODULE_DESCRIPTION ("USB3503 USB HUB driver" );MODULE_LICENSE ("GPL" );
Signature · 1 line
1.8.1.5
Am Montag, 20. Mai 2013, 21:31:57 schrieb Peter Huewe:
Quoted 5 lines
Removing some boilerplate by using
module_i2c_driverinstead of calling register and unregister in the otherwise empty init/exit functionsSigned-off-by Peter Huewe <[email protected]>---
Sorry for the noise
already exists in 3.10-rc1 by Lars-Peter Clausen
8244ac0 USB: misc: usb3503: use module_i2c_driver to simplify the code
I was working on an stale tree - sorry.
Please ignore this patch.
Peter