aboutsummaryrefslogtreecommitdiff
path: root/drivers/w1
diff options
context:
space:
mode:
authorFabio Estevam <fabio.estevam@freescale.com>2012-11-19 10:19:48 -0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-11-21 12:40:14 -0800
commitfd21bfcc2d6e8b7fef20f05deef318b0ab7f8004 (patch)
tree10ed1c225295abd904148fc19f48de213aa0f7ab /drivers/w1
parent99ba2fd297ed475dc6782e9029d4da041a85706a (diff)
w1: mxc_w1: Convert to platform driver
Using module_platform_driver() makes the code smaller and cleaner. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/w1')
-rw-r--r--drivers/w1/masters/mxc_w1.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/drivers/w1/masters/mxc_w1.c b/drivers/w1/masters/mxc_w1.c
index 12c1ab844d8..3fb6c2480d2 100644
--- a/drivers/w1/masters/mxc_w1.c
+++ b/drivers/w1/masters/mxc_w1.c
@@ -191,21 +191,9 @@ static struct platform_driver mxc_w1_driver = {
.name = "mxc_w1",
},
.probe = mxc_w1_probe,
- .remove = mxc_w1_remove,
+ .remove = __devexit_p(mxc_w1_remove),
};
-
-static int __init mxc_w1_init(void)
-{
- return platform_driver_register(&mxc_w1_driver);
-}
-
-static void mxc_w1_exit(void)
-{
- platform_driver_unregister(&mxc_w1_driver);
-}
-
-module_init(mxc_w1_init);
-module_exit(mxc_w1_exit);
+module_platform_driver(mxc_w1_driver);
MODULE_LICENSE("GPL");
MODULE_AUTHOR("Freescale Semiconductors Inc");