diff options
Diffstat (limited to 'drivers/media/radio/radio-gemtek.c')
-rw-r--r-- | drivers/media/radio/radio-gemtek.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/media/radio/radio-gemtek.c b/drivers/media/radio/radio-gemtek.c index 2e639ce6f256..235c0e349820 100644 --- a/drivers/media/radio/radio-gemtek.c +++ b/drivers/media/radio/radio-gemtek.c | |||
@@ -29,6 +29,7 @@ | |||
29 | #include <linux/videodev2.h> /* kernel radio structs */ | 29 | #include <linux/videodev2.h> /* kernel radio structs */ |
30 | #include <linux/mutex.h> | 30 | #include <linux/mutex.h> |
31 | #include <linux/io.h> /* outb, outb_p */ | 31 | #include <linux/io.h> /* outb, outb_p */ |
32 | #include <linux/pnp.h> | ||
32 | #include <linux/slab.h> | 33 | #include <linux/slab.h> |
33 | #include <media/v4l2-ioctl.h> | 34 | #include <media/v4l2-ioctl.h> |
34 | #include <media/v4l2-device.h> | 35 | #include <media/v4l2-device.h> |
@@ -283,6 +284,16 @@ static const struct radio_isa_ops gemtek_ops = { | |||
283 | 284 | ||
284 | static const int gemtek_ioports[] = { 0x20c, 0x30c, 0x24c, 0x34c, 0x248, 0x28c }; | 285 | static const int gemtek_ioports[] = { 0x20c, 0x30c, 0x24c, 0x34c, 0x248, 0x28c }; |
285 | 286 | ||
287 | #ifdef CONFIG_PNP | ||
288 | static struct pnp_device_id gemtek_pnp_devices[] = { | ||
289 | /* AOpen FX-3D/Pro Radio */ | ||
290 | {.id = "ADS7183", .driver_data = 0}, | ||
291 | {.id = ""} | ||
292 | }; | ||
293 | |||
294 | MODULE_DEVICE_TABLE(pnp, gemtek_pnp_devices); | ||
295 | #endif | ||
296 | |||
286 | static struct radio_isa_driver gemtek_driver = { | 297 | static struct radio_isa_driver gemtek_driver = { |
287 | .driver = { | 298 | .driver = { |
288 | .match = radio_isa_match, | 299 | .match = radio_isa_match, |
@@ -292,6 +303,14 @@ static struct radio_isa_driver gemtek_driver = { | |||
292 | .name = "radio-gemtek", | 303 | .name = "radio-gemtek", |
293 | }, | 304 | }, |
294 | }, | 305 | }, |
306 | #ifdef CONFIG_PNP | ||
307 | .pnp_driver = { | ||
308 | .name = "radio-gemtek", | ||
309 | .id_table = gemtek_pnp_devices, | ||
310 | .probe = radio_isa_pnp_probe, | ||
311 | .remove = radio_isa_pnp_remove, | ||
312 | }, | ||
313 | #endif | ||
295 | .io_params = io, | 314 | .io_params = io, |
296 | .radio_nr_params = radio_nr, | 315 | .radio_nr_params = radio_nr, |
297 | .io_ports = gemtek_ioports, | 316 | .io_ports = gemtek_ioports, |
@@ -305,12 +324,18 @@ static struct radio_isa_driver gemtek_driver = { | |||
305 | static int __init gemtek_init(void) | 324 | static int __init gemtek_init(void) |
306 | { | 325 | { |
307 | gemtek_driver.probe = probe; | 326 | gemtek_driver.probe = probe; |
327 | #ifdef CONFIG_PNP | ||
328 | pnp_register_driver(&gemtek_driver.pnp_driver); | ||
329 | #endif | ||
308 | return isa_register_driver(&gemtek_driver.driver, GEMTEK_MAX); | 330 | return isa_register_driver(&gemtek_driver.driver, GEMTEK_MAX); |
309 | } | 331 | } |
310 | 332 | ||
311 | static void __exit gemtek_exit(void) | 333 | static void __exit gemtek_exit(void) |
312 | { | 334 | { |
313 | hardmute = 1; /* Turn off PLL */ | 335 | hardmute = 1; /* Turn off PLL */ |
336 | #ifdef CONFIG_PNP | ||
337 | pnp_unregister_driver(&gemtek_driver.pnp_driver); | ||
338 | #endif | ||
314 | isa_unregister_driver(&gemtek_driver.driver); | 339 | isa_unregister_driver(&gemtek_driver.driver); |
315 | } | 340 | } |
316 | 341 | ||