]> git.karo-electronics.de Git - linux-beck.git/commitdiff
ide: tx4938ide: use module_platform_driver_probe()
authorJingoo Han <jg1.han@samsung.com>
Mon, 4 Mar 2013 16:25:46 +0000 (16:25 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 8 Mar 2013 17:38:15 +0000 (12:38 -0500)
This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/ide/tx4938ide.c

index 91d49dd957ef634f02a6c9657afe236524d3a936..ede8575ac7d5d12e9d8fe1c20d3d2a9ab2cde013 100644 (file)
@@ -203,18 +203,7 @@ static struct platform_driver tx4938ide_driver = {
        .remove = __exit_p(tx4938ide_remove),
 };
 
-static int __init tx4938ide_init(void)
-{
-       return platform_driver_probe(&tx4938ide_driver, tx4938ide_probe);
-}
-
-static void __exit tx4938ide_exit(void)
-{
-       platform_driver_unregister(&tx4938ide_driver);
-}
-
-module_init(tx4938ide_init);
-module_exit(tx4938ide_exit);
+module_platform_driver_probe(tx4938ide_driver, tx4938ide_probe);
 
 MODULE_DESCRIPTION("TX4938 internal IDE driver");
 MODULE_LICENSE("GPL");