pata_at32: use module_platform_driver_probe()
authorJingoo Han <jg1.han@samsung.com>
Tue, 5 Mar 2013 01:39:47 +0000 (10:39 +0900)
committerJeff Garzik <jgarzik@redhat.com>
Wed, 3 Apr 2013 23:52:10 +0000 (19:52 -0400)
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: Jeff Garzik <jgarzik@redhat.com>
drivers/ata/pata_at32.c

index 36f189c7ee8c4f89ebe022ce91b0fe366fdc77e1..8d493b4a0961985347feb48f990075233578c893 100644 (file)
@@ -393,18 +393,7 @@ static struct platform_driver pata_at32_driver = {
        },
 };
 
-static int __init pata_at32_init(void)
-{
-       return platform_driver_probe(&pata_at32_driver, pata_at32_probe);
-}
-
-static void __exit pata_at32_exit(void)
-{
-       platform_driver_unregister(&pata_at32_driver);
-}
-
-module_init(pata_at32_init);
-module_exit(pata_at32_exit);
+module_platform_driver_probe(pata_at32_driver, pata_at32_probe);
 
 MODULE_LICENSE("GPL");
 MODULE_DESCRIPTION("AVR32 SMC/CFC PATA Driver");