提交 b00e126f 编写于 作者: A Axel Lin 提交者: Greg Kroah-Hartman

MISC: convert drivers/misc/* to use module_platform_driver()

This patch converts the drivers in drivers/misc/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.
Signed-off-by: NAxel Lin <axel.lin@gmail.com>
Acked-by: NIra W. Snyder <iws@ovro.caltech.edu>
Cc: Pavan Savoy <pavan_savoy@ti.com>
Cc: Donggeun Kim <dg77.kim@samsung.com>
Acked-By: NPratyush Anand <pratyush.anand@st.com>
Acked-by: NArnd Bergmann <arnd@arndb.de>
Acked-by: NPratyush Anand <pratyush.anand@st.com>
Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
上级 dcd6c922
...@@ -1410,23 +1410,8 @@ static struct platform_driver data_of_driver = { ...@@ -1410,23 +1410,8 @@ static struct platform_driver data_of_driver = {
}, },
}; };
/* module_platform_driver(data_of_driver);
* Module Init / Exit
*/
static int __init data_init(void)
{
return platform_driver_register(&data_of_driver);
}
static void __exit data_exit(void)
{
platform_driver_unregister(&data_of_driver);
}
MODULE_AUTHOR("Ira W. Snyder <iws@ovro.caltech.edu>"); MODULE_AUTHOR("Ira W. Snyder <iws@ovro.caltech.edu>");
MODULE_DESCRIPTION("CARMA DATA-FPGA Access Driver"); MODULE_DESCRIPTION("CARMA DATA-FPGA Access Driver");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
module_init(data_init);
module_exit(data_exit);
...@@ -488,17 +488,7 @@ static struct platform_driver max8997_muic_driver = { ...@@ -488,17 +488,7 @@ static struct platform_driver max8997_muic_driver = {
.remove = __devexit_p(max8997_muic_remove), .remove = __devexit_p(max8997_muic_remove),
}; };
static int __init max8997_muic_init(void) module_platform_driver(max8997_muic_driver);
{
return platform_driver_register(&max8997_muic_driver);
}
module_init(max8997_muic_init);
static void __exit max8997_muic_exit(void)
{
platform_driver_unregister(&max8997_muic_driver);
}
module_exit(max8997_muic_exit);
MODULE_DESCRIPTION("Maxim MAX8997 MUIC driver"); MODULE_DESCRIPTION("Maxim MAX8997 MUIC driver");
MODULE_AUTHOR("Donggeun Kim <dg77.kim@samsung.com>"); MODULE_AUTHOR("Donggeun Kim <dg77.kim@samsung.com>");
......
...@@ -891,17 +891,7 @@ static struct platform_driver spear_pcie_gadget_driver = { ...@@ -891,17 +891,7 @@ static struct platform_driver spear_pcie_gadget_driver = {
}, },
}; };
static int __init spear_pcie_gadget_init(void) module_platform_driver(spear_pcie_gadget_driver);
{
return platform_driver_register(&spear_pcie_gadget_driver);
}
module_init(spear_pcie_gadget_init);
static void __exit spear_pcie_gadget_exit(void)
{
platform_driver_unregister(&spear_pcie_gadget_driver);
}
module_exit(spear_pcie_gadget_exit);
MODULE_ALIAS("platform:pcie-gadget-spear"); MODULE_ALIAS("platform:pcie-gadget-spear");
MODULE_AUTHOR("Pratyush Anand"); MODULE_AUTHOR("Pratyush Anand");
......
...@@ -837,19 +837,8 @@ static struct platform_driver kim_platform_driver = { ...@@ -837,19 +837,8 @@ static struct platform_driver kim_platform_driver = {
}, },
}; };
static int __init st_kim_init(void) module_platform_driver(kim_platform_driver);
{
return platform_driver_register(&kim_platform_driver);
}
static void __exit st_kim_deinit(void)
{
platform_driver_unregister(&kim_platform_driver);
}
module_init(st_kim_init);
module_exit(st_kim_deinit);
MODULE_AUTHOR("Pavan Savoy <pavan_savoy@ti.com>"); MODULE_AUTHOR("Pavan Savoy <pavan_savoy@ti.com>");
MODULE_DESCRIPTION("Shared Transport Driver for TI BT/FM/GPS combo chips "); MODULE_DESCRIPTION("Shared Transport Driver for TI BT/FM/GPS combo chips ");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册