usb: musb: blackfin: use module_platform_driver macro
authorSrinivas Kandagatla <srinivas.kandagatla@st.com>
Wed, 10 Oct 2012 18:36:52 +0000 (19:36 +0100)
committerFelipe Balbi <balbi@ti.com>
Mon, 15 Oct 2012 12:29:32 +0000 (15:29 +0300)
This patch removes some code duplication by using
module_platform_driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
drivers/usb/musb/blackfin.c

index e8cff9b..8c16a22 100644 (file)
@@ -585,15 +585,4 @@ static struct platform_driver bfin_driver = {
 MODULE_DESCRIPTION("Blackfin MUSB Glue Layer");
 MODULE_AUTHOR("Bryan Wy <cooloney@kernel.org>");
 MODULE_LICENSE("GPL v2");
-
-static int __init bfin_init(void)
-{
-       return platform_driver_register(&bfin_driver);
-}
-module_init(bfin_init);
-
-static void __exit bfin_exit(void)
-{
-       platform_driver_unregister(&bfin_driver);
-}
-module_exit(bfin_exit);
+module_platform_driver(bfin_driver);