Commit dbf2b92d authored by Axel Lin's avatar Axel Lin Committed by David S. Miller

sbus: convert drivers/sbus/char/* to use module_platform_driver()

This patch converts the drivers in drivers/sbus/char/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.
Signed-off-by: default avatarAxel Lin <axel.lin@gmail.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent e4104710
......@@ -416,17 +416,6 @@ static struct platform_driver bbc_i2c_driver = {
.remove = __devexit_p(bbc_i2c_remove),
};
static int __init bbc_i2c_init(void)
{
return platform_driver_register(&bbc_i2c_driver);
}
static void __exit bbc_i2c_exit(void)
{
platform_driver_unregister(&bbc_i2c_driver);
}
module_init(bbc_i2c_init);
module_exit(bbc_i2c_exit);
module_platform_driver(bbc_i2c_driver);
MODULE_LICENSE("GPL");
......@@ -275,15 +275,4 @@ static struct platform_driver d7s_driver = {
.remove = __devexit_p(d7s_remove),
};
static int __init d7s_init(void)
{
return platform_driver_register(&d7s_driver);
}
static void __exit d7s_exit(void)
{
platform_driver_unregister(&d7s_driver);
}
module_init(d7s_init);
module_exit(d7s_exit);
module_platform_driver(d7s_driver);
......@@ -1138,16 +1138,6 @@ static struct platform_driver envctrl_driver = {
.remove = __devexit_p(envctrl_remove),
};
static int __init envctrl_init(void)
{
return platform_driver_register(&envctrl_driver);
}
static void __exit envctrl_exit(void)
{
platform_driver_unregister(&envctrl_driver);
}
module_platform_driver(envctrl_driver);
module_init(envctrl_init);
module_exit(envctrl_exit);
MODULE_LICENSE("GPL");
......@@ -216,16 +216,6 @@ static struct platform_driver flash_driver = {
.remove = __devexit_p(flash_remove),
};
static int __init flash_init(void)
{
return platform_driver_register(&flash_driver);
}
static void __exit flash_cleanup(void)
{
platform_driver_unregister(&flash_driver);
}
module_platform_driver(flash_driver);
module_init(flash_init);
module_exit(flash_cleanup);
MODULE_LICENSE("GPL");
......@@ -435,16 +435,6 @@ static struct platform_driver uctrl_driver = {
};
static int __init uctrl_init(void)
{
return platform_driver_register(&uctrl_driver);
}
static void __exit uctrl_exit(void)
{
platform_driver_unregister(&uctrl_driver);
}
module_platform_driver(uctrl_driver);
module_init(uctrl_init);
module_exit(uctrl_exit);
MODULE_LICENSE("GPL");
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