diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-27 01:44:26 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2012-01-08 19:14:58 -0500 |
commit | 99c8ea3e57e7b5551ffd9cd401c4bf302b5664e3 (patch) | |
tree | c6bbe0f513651b0fb46db0b39f4dc6732724dbdc /drivers/ata/pata_rb532_cf.c | |
parent | d63e94a442df14c4e7b02763c3230374218b41f1 (diff) |
SATA/PATA: convert drivers/ata/* to use module_platform_driver()
This patch converts the drivers in drivers/ata/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.
Cc: Viresh Kumar <viresh.kumar@st.com>
Cc: Jeff Garzik <jgarzik@pobox.com>
Cc: Arnaud Patard <arnaud.patard@rtp-net.org>
Cc: Alessandro Zummo <a.zummo@towertech.it>
Cc: Sylvain Munaut <tnt@246tNt.com>
Cc: Anton Vorontsov <avorontsov@ru.mvista.com>
Cc: Marek Vasut <marek.vasut@gmail.com>
Cc: Florian Fainelli <florian@openwrt.org>
Cc: Mark Miesfeld <mmiesfeld@amcc.com>
Cc: Ashish Kalra <ashish.kalra@freescale.com>
Cc: Paul Mundt <lethal@linux-sh.org>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_rb532_cf.c')
-rw-r--r-- | drivers/ata/pata_rb532_cf.c | 21 |
1 files changed, 2 insertions, 19 deletions
diff --git a/drivers/ata/pata_rb532_cf.c b/drivers/ata/pata_rb532_cf.c index 1b9d10d9c5d9..9417101bd5ca 100644 --- a/drivers/ata/pata_rb532_cf.c +++ b/drivers/ata/pata_rb532_cf.c | |||
@@ -188,9 +188,6 @@ static __devexit int rb532_pata_driver_remove(struct platform_device *pdev) | |||
188 | return 0; | 188 | return 0; |
189 | } | 189 | } |
190 | 190 | ||
191 | /* work with hotplug and coldplug */ | ||
192 | MODULE_ALIAS("platform:" DRV_NAME); | ||
193 | |||
194 | static struct platform_driver rb532_pata_platform_driver = { | 191 | static struct platform_driver rb532_pata_platform_driver = { |
195 | .probe = rb532_pata_driver_probe, | 192 | .probe = rb532_pata_driver_probe, |
196 | .remove = __devexit_p(rb532_pata_driver_remove), | 193 | .remove = __devexit_p(rb532_pata_driver_remove), |
@@ -200,27 +197,13 @@ static struct platform_driver rb532_pata_platform_driver = { | |||
200 | }, | 197 | }, |
201 | }; | 198 | }; |
202 | 199 | ||
203 | /* ------------------------------------------------------------------------ */ | ||
204 | |||
205 | #define DRV_INFO DRV_DESC " version " DRV_VERSION | 200 | #define DRV_INFO DRV_DESC " version " DRV_VERSION |
206 | 201 | ||
207 | static int __init rb532_pata_module_init(void) | 202 | module_platform_driver(rb532_pata_platform_driver); |
208 | { | ||
209 | printk(KERN_INFO DRV_INFO "\n"); | ||
210 | |||
211 | return platform_driver_register(&rb532_pata_platform_driver); | ||
212 | } | ||
213 | |||
214 | static void __exit rb532_pata_module_exit(void) | ||
215 | { | ||
216 | platform_driver_unregister(&rb532_pata_platform_driver); | ||
217 | } | ||
218 | 203 | ||
219 | MODULE_AUTHOR("Gabor Juhos <juhosg at openwrt.org>"); | 204 | MODULE_AUTHOR("Gabor Juhos <juhosg at openwrt.org>"); |
220 | MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>"); | 205 | MODULE_AUTHOR("Florian Fainelli <florian@openwrt.org>"); |
221 | MODULE_DESCRIPTION(DRV_DESC); | 206 | MODULE_DESCRIPTION(DRV_DESC); |
222 | MODULE_VERSION(DRV_VERSION); | 207 | MODULE_VERSION(DRV_VERSION); |
223 | MODULE_LICENSE("GPL"); | 208 | MODULE_LICENSE("GPL"); |
224 | 209 | MODULE_ALIAS("platform:" DRV_NAME); | |
225 | module_init(rb532_pata_module_init); | ||
226 | module_exit(rb532_pata_module_exit); | ||