diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-01-10 01:21:49 -0500 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2012-01-10 20:27:13 -0500 |
commit | 1d6629b1561ad34a6e6d17ece00bd65e1bab3724 (patch) | |
tree | 61b5a5062aa797f5bfc1da0a7b3b9876ce3d2a21 /drivers/media/radio | |
parent | aa5fb974cf3a30162c9c426c507486f3c2ab54c5 (diff) |
[media] convert drivers/media/* to use module_platform_driver()
This patch converts the drivers in drivers/media/* to use the
module_platform_driver() macro which makes the code smaller and a bit
simpler.
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Cc: Kyungmin Park <kyungmin.park@samsung.com>
Cc: Hans Verkuil <hans.verkuil@cisco.com>
Cc: "Richard Röjfors" <richard.rojfors@pelagicore.com>
Cc: "Matti J. Aaltonen" <matti.j.aaltonen@nokia.com>
Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi>
Cc: Manjunath Hadli <manjunath.hadli@ti.com>
Cc: Muralidharan Karicheri <m-karicheri2@ti.com>
Cc: Anatolij Gustschin <agust@denx.de>
Cc: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Cc: Marek Szyprowski <m.szyprowski@samsung.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Jonathan Corbet <corbet@lwn.net>
Cc: Daniel Drake <dsd@laptop.org>
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Acked-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Acked-by: Marek Szyprowski <m.szyprowski@samsung.com>
Acked-by: Matti J. Aaltonen <matti.j.aaltonen@nokia.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/radio')
-rw-r--r-- | drivers/media/radio/radio-si4713.c | 15 | ||||
-rw-r--r-- | drivers/media/radio/radio-timb.c | 15 | ||||
-rw-r--r-- | drivers/media/radio/radio-wl1273.c | 17 |
3 files changed, 4 insertions, 43 deletions
diff --git a/drivers/media/radio/radio-si4713.c b/drivers/media/radio/radio-si4713.c index d1fab5885061..c54210c7fef9 100644 --- a/drivers/media/radio/radio-si4713.c +++ b/drivers/media/radio/radio-si4713.c | |||
@@ -355,17 +355,4 @@ static struct platform_driver radio_si4713_pdriver = { | |||
355 | .remove = __exit_p(radio_si4713_pdriver_remove), | 355 | .remove = __exit_p(radio_si4713_pdriver_remove), |
356 | }; | 356 | }; |
357 | 357 | ||
358 | /* Module Interface */ | 358 | module_platform_driver(radio_si4713_pdriver); |
359 | static int __init radio_si4713_module_init(void) | ||
360 | { | ||
361 | return platform_driver_register(&radio_si4713_pdriver); | ||
362 | } | ||
363 | |||
364 | static void __exit radio_si4713_module_exit(void) | ||
365 | { | ||
366 | platform_driver_unregister(&radio_si4713_pdriver); | ||
367 | } | ||
368 | |||
369 | module_init(radio_si4713_module_init); | ||
370 | module_exit(radio_si4713_module_exit); | ||
371 | |||
diff --git a/drivers/media/radio/radio-timb.c b/drivers/media/radio/radio-timb.c index 3e9209f84e09..5d9a90ac3a1c 100644 --- a/drivers/media/radio/radio-timb.c +++ b/drivers/media/radio/radio-timb.c | |||
@@ -226,20 +226,7 @@ static struct platform_driver timbradio_platform_driver = { | |||
226 | .remove = timbradio_remove, | 226 | .remove = timbradio_remove, |
227 | }; | 227 | }; |
228 | 228 | ||
229 | /*--------------------------------------------------------------------------*/ | 229 | module_platform_driver(timbradio_platform_driver); |
230 | |||
231 | static int __init timbradio_init(void) | ||
232 | { | ||
233 | return platform_driver_register(&timbradio_platform_driver); | ||
234 | } | ||
235 | |||
236 | static void __exit timbradio_exit(void) | ||
237 | { | ||
238 | platform_driver_unregister(&timbradio_platform_driver); | ||
239 | } | ||
240 | |||
241 | module_init(timbradio_init); | ||
242 | module_exit(timbradio_exit); | ||
243 | 230 | ||
244 | MODULE_DESCRIPTION("Timberdale Radio driver"); | 231 | MODULE_DESCRIPTION("Timberdale Radio driver"); |
245 | MODULE_AUTHOR("Mocean Laboratories <info@mocean-labs.com>"); | 232 | MODULE_AUTHOR("Mocean Laboratories <info@mocean-labs.com>"); |
diff --git a/drivers/media/radio/radio-wl1273.c b/drivers/media/radio/radio-wl1273.c index 8aa4968d57bc..f1b607099b6c 100644 --- a/drivers/media/radio/radio-wl1273.c +++ b/drivers/media/radio/radio-wl1273.c | |||
@@ -2148,8 +2148,6 @@ pdata_err: | |||
2148 | return r; | 2148 | return r; |
2149 | } | 2149 | } |
2150 | 2150 | ||
2151 | MODULE_ALIAS("platform:wl1273_fm_radio"); | ||
2152 | |||
2153 | static struct platform_driver wl1273_fm_radio_driver = { | 2151 | static struct platform_driver wl1273_fm_radio_driver = { |
2154 | .probe = wl1273_fm_radio_probe, | 2152 | .probe = wl1273_fm_radio_probe, |
2155 | .remove = __devexit_p(wl1273_fm_radio_remove), | 2153 | .remove = __devexit_p(wl1273_fm_radio_remove), |
@@ -2159,20 +2157,9 @@ static struct platform_driver wl1273_fm_radio_driver = { | |||
2159 | }, | 2157 | }, |
2160 | }; | 2158 | }; |
2161 | 2159 | ||
2162 | static int __init wl1273_fm_module_init(void) | 2160 | module_platform_driver(wl1273_fm_radio_driver); |
2163 | { | ||
2164 | pr_info("%s\n", __func__); | ||
2165 | return platform_driver_register(&wl1273_fm_radio_driver); | ||
2166 | } | ||
2167 | module_init(wl1273_fm_module_init); | ||
2168 | |||
2169 | static void __exit wl1273_fm_module_exit(void) | ||
2170 | { | ||
2171 | platform_driver_unregister(&wl1273_fm_radio_driver); | ||
2172 | pr_info(DRIVER_DESC ", Exiting.\n"); | ||
2173 | } | ||
2174 | module_exit(wl1273_fm_module_exit); | ||
2175 | 2161 | ||
2176 | MODULE_AUTHOR("Matti Aaltonen <matti.j.aaltonen@nokia.com>"); | 2162 | MODULE_AUTHOR("Matti Aaltonen <matti.j.aaltonen@nokia.com>"); |
2177 | MODULE_DESCRIPTION(DRIVER_DESC); | 2163 | MODULE_DESCRIPTION(DRIVER_DESC); |
2178 | MODULE_LICENSE("GPL"); | 2164 | MODULE_LICENSE("GPL"); |
2165 | MODULE_ALIAS("platform:wl1273_fm_radio"); | ||