diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-11-26 02:18:55 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-11-26 23:12:48 -0500 |
commit | 11e3123d9fdbe0aab1adf9ab5a5b1b28aa91daa7 (patch) | |
tree | 613079a724a4a97db233c4e6f75ac2a0e37db73d /drivers/uio | |
parent | ccbc60d3e19a1b6ae66ca0d89b3da02dde62088b (diff) |
uio: convert drivers/uio/* to use module_platform_driver()
This patch converts the drivers in drivers/uio/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.
Cc: Uwe Kleine-König <Uwe.Kleine-Koenig@digi.com>
Cc: Magnus Damm <damm@igel.co.jp>
Cc: Amit Chatterjee <amit.chatterjee@ti.com>
Cc: Pratheesh Gangadhar <pratheesh@ti.com>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/uio')
-rw-r--r-- | drivers/uio/uio_pdrv.c | 12 | ||||
-rw-r--r-- | drivers/uio/uio_pdrv_genirq.c | 13 | ||||
-rw-r--r-- | drivers/uio/uio_pruss.c | 14 |
3 files changed, 3 insertions, 36 deletions
diff --git a/drivers/uio/uio_pdrv.c b/drivers/uio/uio_pdrv.c index ff5059517351..72d3646c7365 100644 --- a/drivers/uio/uio_pdrv.c +++ b/drivers/uio/uio_pdrv.c | |||
@@ -104,17 +104,7 @@ static struct platform_driver uio_pdrv = { | |||
104 | }, | 104 | }, |
105 | }; | 105 | }; |
106 | 106 | ||
107 | static int __init uio_pdrv_init(void) | 107 | module_platform_driver(uio_pdrv); |
108 | { | ||
109 | return platform_driver_register(&uio_pdrv); | ||
110 | } | ||
111 | |||
112 | static void __exit uio_pdrv_exit(void) | ||
113 | { | ||
114 | platform_driver_unregister(&uio_pdrv); | ||
115 | } | ||
116 | module_init(uio_pdrv_init); | ||
117 | module_exit(uio_pdrv_exit); | ||
118 | 108 | ||
119 | MODULE_AUTHOR("Uwe Kleine-Koenig"); | 109 | MODULE_AUTHOR("Uwe Kleine-Koenig"); |
120 | MODULE_DESCRIPTION("Userspace I/O platform driver"); | 110 | MODULE_DESCRIPTION("Userspace I/O platform driver"); |
diff --git a/drivers/uio/uio_pdrv_genirq.c b/drivers/uio/uio_pdrv_genirq.c index 25de302009a1..b98371d93a92 100644 --- a/drivers/uio/uio_pdrv_genirq.c +++ b/drivers/uio/uio_pdrv_genirq.c | |||
@@ -273,18 +273,7 @@ static struct platform_driver uio_pdrv_genirq = { | |||
273 | }, | 273 | }, |
274 | }; | 274 | }; |
275 | 275 | ||
276 | static int __init uio_pdrv_genirq_init(void) | 276 | module_platform_driver(uio_pdrv_genirq); |
277 | { | ||
278 | return platform_driver_register(&uio_pdrv_genirq); | ||
279 | } | ||
280 | |||
281 | static void __exit uio_pdrv_genirq_exit(void) | ||
282 | { | ||
283 | platform_driver_unregister(&uio_pdrv_genirq); | ||
284 | } | ||
285 | |||
286 | module_init(uio_pdrv_genirq_init); | ||
287 | module_exit(uio_pdrv_genirq_exit); | ||
288 | 277 | ||
289 | MODULE_AUTHOR("Magnus Damm"); | 278 | MODULE_AUTHOR("Magnus Damm"); |
290 | MODULE_DESCRIPTION("Userspace I/O platform driver with generic IRQ handling"); | 279 | MODULE_DESCRIPTION("Userspace I/O platform driver with generic IRQ handling"); |
diff --git a/drivers/uio/uio_pruss.c b/drivers/uio/uio_pruss.c index e67b566e7aa3..33a7a273b453 100644 --- a/drivers/uio/uio_pruss.c +++ b/drivers/uio/uio_pruss.c | |||
@@ -227,19 +227,7 @@ static struct platform_driver pruss_driver = { | |||
227 | }, | 227 | }, |
228 | }; | 228 | }; |
229 | 229 | ||
230 | static int __init pruss_init_module(void) | 230 | module_platform_driver(pruss_driver); |
231 | { | ||
232 | return platform_driver_register(&pruss_driver); | ||
233 | } | ||
234 | |||
235 | module_init(pruss_init_module); | ||
236 | |||
237 | static void __exit pruss_exit_module(void) | ||
238 | { | ||
239 | platform_driver_unregister(&pruss_driver); | ||
240 | } | ||
241 | |||
242 | module_exit(pruss_exit_module); | ||
243 | 231 | ||
244 | MODULE_LICENSE("GPL v2"); | 232 | MODULE_LICENSE("GPL v2"); |
245 | MODULE_VERSION(DRV_VERSION); | 233 | MODULE_VERSION(DRV_VERSION); |