[media] radio-keene: Use module_usb_driver
authorSachin Kamat <sachin.kamat@linaro.org>
Mon, 27 Jan 2014 11:56:02 +0000 (08:56 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 4 Feb 2014 11:57:49 +0000 (09:57 -0200)
module_usb_driver eliminates the boilerplate and makes the code simpler.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/radio/radio-keene.c

index fa3964022b96d939a3c222b90d81bd5bb2822255..3d127825eceb7a06d95938a031dcaea8d696162a 100644 (file)
@@ -416,22 +416,5 @@ static struct usb_driver usb_keene_driver = {
        .reset_resume           = usb_keene_resume,
 };
 
-static int __init keene_init(void)
-{
-       int retval = usb_register(&usb_keene_driver);
-
-       if (retval)
-               pr_err(KBUILD_MODNAME
-                       ": usb_register failed. Error number %d\n", retval);
-
-       return retval;
-}
-
-static void __exit keene_exit(void)
-{
-       usb_deregister(&usb_keene_driver);
-}
-
-module_init(keene_init);
-module_exit(keene_exit);
+module_usb_driver(usb_keene_driver);