diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-29 19:00:48 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-03-29 19:00:48 -0400 |
commit | a6f707b601c3f85d4b816ea08a757ea1af4f1cc0 (patch) | |
tree | 86cea1675e515c6baca64cea812ebe2ccc6aa955 /drivers/pcmcia | |
parent | ef08e78268423fc4d7fbc3e54bd9a67fc8da7cc5 (diff) | |
parent | 80af9e6d7ae633309cc5bca96aee6a45117e7c98 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia
Pull a few PCMCIA updates from Dominik Brodowski.
Fix up trivial conflict (modified code in question had been removed) in
drivers/pcmcia/soc_common.c.
* git://git.kernel.org/pub/scm/linux/kernel/git/brodo/pcmcia:
pcmcia at91_cf: fix raw gpio number usage
ARM: pxa: fix error handling in pxa2xx_drv_pcmcia_probe
pcmcia: Convert to DEFINE_PCI_DEVICE_TABLE
pcmcia: convert drivers/pcmcia/* to use module_platform_driver()
pcmcia: irq: Remove IRQF_DISABLED
Diffstat (limited to 'drivers/pcmcia')
-rw-r--r-- | drivers/pcmcia/at91_cf.c | 52 | ||||
-rw-r--r-- | drivers/pcmcia/bcm63xx_pcmcia.c | 2 | ||||
-rw-r--r-- | drivers/pcmcia/bfin_cf_pcmcia.c | 13 | ||||
-rw-r--r-- | drivers/pcmcia/db1xxx_ss.c | 17 | ||||
-rw-r--r-- | drivers/pcmcia/electra_cf.c | 12 | ||||
-rw-r--r-- | drivers/pcmcia/i82092.c | 11 | ||||
-rw-r--r-- | drivers/pcmcia/m8xx_pcmcia.c | 13 | ||||
-rw-r--r-- | drivers/pcmcia/pd6729.c | 9 | ||||
-rw-r--r-- | drivers/pcmcia/pxa2xx_viper.c | 13 | ||||
-rw-r--r-- | drivers/pcmcia/vrc4173_cardu.c | 7 | ||||
-rw-r--r-- | drivers/pcmcia/xxs1500_ss.c | 13 | ||||
-rw-r--r-- | drivers/pcmcia/yenta_socket.c | 2 |
12 files changed, 43 insertions, 121 deletions
diff --git a/drivers/pcmcia/at91_cf.c b/drivers/pcmcia/at91_cf.c index 1dd68f502634..9694c1e783a5 100644 --- a/drivers/pcmcia/at91_cf.c +++ b/drivers/pcmcia/at91_cf.c | |||
@@ -16,13 +16,13 @@ | |||
16 | #include <linux/init.h> | 16 | #include <linux/init.h> |
17 | #include <linux/interrupt.h> | 17 | #include <linux/interrupt.h> |
18 | #include <linux/slab.h> | 18 | #include <linux/slab.h> |
19 | #include <linux/gpio.h> | ||
19 | 20 | ||
20 | #include <pcmcia/ss.h> | 21 | #include <pcmcia/ss.h> |
21 | 22 | ||
22 | #include <mach/hardware.h> | 23 | #include <mach/hardware.h> |
23 | #include <asm/io.h> | 24 | #include <asm/io.h> |
24 | #include <asm/sizes.h> | 25 | #include <asm/sizes.h> |
25 | #include <asm/gpio.h> | ||
26 | 26 | ||
27 | #include <mach/board.h> | 27 | #include <mach/board.h> |
28 | #include <mach/at91rm9200_mc.h> | 28 | #include <mach/at91rm9200_mc.h> |
@@ -70,7 +70,7 @@ static irqreturn_t at91_cf_irq(int irq, void *_cf) | |||
70 | { | 70 | { |
71 | struct at91_cf_socket *cf = _cf; | 71 | struct at91_cf_socket *cf = _cf; |
72 | 72 | ||
73 | if (irq == cf->board->det_pin) { | 73 | if (irq == gpio_to_irq(cf->board->det_pin)) { |
74 | unsigned present = at91_cf_present(cf); | 74 | unsigned present = at91_cf_present(cf); |
75 | 75 | ||
76 | /* kick pccard as needed */ | 76 | /* kick pccard as needed */ |
@@ -96,8 +96,8 @@ static int at91_cf_get_status(struct pcmcia_socket *s, u_int *sp) | |||
96 | 96 | ||
97 | /* NOTE: CF is always 3VCARD */ | 97 | /* NOTE: CF is always 3VCARD */ |
98 | if (at91_cf_present(cf)) { | 98 | if (at91_cf_present(cf)) { |
99 | int rdy = cf->board->irq_pin; /* RDY/nIRQ */ | 99 | int rdy = gpio_is_valid(cf->board->irq_pin); /* RDY/nIRQ */ |
100 | int vcc = cf->board->vcc_pin; | 100 | int vcc = gpio_is_valid(cf->board->vcc_pin); |
101 | 101 | ||
102 | *sp = SS_DETECT | SS_3VCARD; | 102 | *sp = SS_DETECT | SS_3VCARD; |
103 | if (!rdy || gpio_get_value(rdy)) | 103 | if (!rdy || gpio_get_value(rdy)) |
@@ -118,7 +118,7 @@ at91_cf_set_socket(struct pcmcia_socket *sock, struct socket_state_t *s) | |||
118 | cf = container_of(sock, struct at91_cf_socket, socket); | 118 | cf = container_of(sock, struct at91_cf_socket, socket); |
119 | 119 | ||
120 | /* switch Vcc if needed and possible */ | 120 | /* switch Vcc if needed and possible */ |
121 | if (cf->board->vcc_pin) { | 121 | if (gpio_is_valid(cf->board->vcc_pin)) { |
122 | switch (s->Vcc) { | 122 | switch (s->Vcc) { |
123 | case 0: | 123 | case 0: |
124 | gpio_set_value(cf->board->vcc_pin, 0); | 124 | gpio_set_value(cf->board->vcc_pin, 0); |
@@ -222,7 +222,7 @@ static int __init at91_cf_probe(struct platform_device *pdev) | |||
222 | struct resource *io; | 222 | struct resource *io; |
223 | int status; | 223 | int status; |
224 | 224 | ||
225 | if (!board || !board->det_pin || !board->rst_pin) | 225 | if (!board || !gpio_is_valid(board->det_pin) || !gpio_is_valid(board->rst_pin)) |
226 | return -ENODEV; | 226 | return -ENODEV; |
227 | 227 | ||
228 | io = platform_get_resource(pdev, IORESOURCE_MEM, 0); | 228 | io = platform_get_resource(pdev, IORESOURCE_MEM, 0); |
@@ -242,7 +242,7 @@ static int __init at91_cf_probe(struct platform_device *pdev) | |||
242 | status = gpio_request(board->det_pin, "cf_det"); | 242 | status = gpio_request(board->det_pin, "cf_det"); |
243 | if (status < 0) | 243 | if (status < 0) |
244 | goto fail0; | 244 | goto fail0; |
245 | status = request_irq(board->det_pin, at91_cf_irq, 0, driver_name, cf); | 245 | status = request_irq(gpio_to_irq(board->det_pin), at91_cf_irq, 0, driver_name, cf); |
246 | if (status < 0) | 246 | if (status < 0) |
247 | goto fail00; | 247 | goto fail00; |
248 | device_init_wakeup(&pdev->dev, 1); | 248 | device_init_wakeup(&pdev->dev, 1); |
@@ -251,7 +251,7 @@ static int __init at91_cf_probe(struct platform_device *pdev) | |||
251 | if (status < 0) | 251 | if (status < 0) |
252 | goto fail0a; | 252 | goto fail0a; |
253 | 253 | ||
254 | if (board->vcc_pin) { | 254 | if (gpio_is_valid(board->vcc_pin)) { |
255 | status = gpio_request(board->vcc_pin, "cf_vcc"); | 255 | status = gpio_request(board->vcc_pin, "cf_vcc"); |
256 | if (status < 0) | 256 | if (status < 0) |
257 | goto fail0b; | 257 | goto fail0b; |
@@ -263,15 +263,15 @@ static int __init at91_cf_probe(struct platform_device *pdev) | |||
263 | * unless we report that we handle everything (sigh). | 263 | * unless we report that we handle everything (sigh). |
264 | * (Note: DK board doesn't wire the IRQ pin...) | 264 | * (Note: DK board doesn't wire the IRQ pin...) |
265 | */ | 265 | */ |
266 | if (board->irq_pin) { | 266 | if (gpio_is_valid(board->irq_pin)) { |
267 | status = gpio_request(board->irq_pin, "cf_irq"); | 267 | status = gpio_request(board->irq_pin, "cf_irq"); |
268 | if (status < 0) | 268 | if (status < 0) |
269 | goto fail0c; | 269 | goto fail0c; |
270 | status = request_irq(board->irq_pin, at91_cf_irq, | 270 | status = request_irq(gpio_to_irq(board->irq_pin), at91_cf_irq, |
271 | IRQF_SHARED, driver_name, cf); | 271 | IRQF_SHARED, driver_name, cf); |
272 | if (status < 0) | 272 | if (status < 0) |
273 | goto fail0d; | 273 | goto fail0d; |
274 | cf->socket.pci_irq = board->irq_pin; | 274 | cf->socket.pci_irq = gpio_to_irq(board->irq_pin); |
275 | } else | 275 | } else |
276 | cf->socket.pci_irq = nr_irqs + 1; | 276 | cf->socket.pci_irq = nr_irqs + 1; |
277 | 277 | ||
@@ -290,7 +290,7 @@ static int __init at91_cf_probe(struct platform_device *pdev) | |||
290 | } | 290 | } |
291 | 291 | ||
292 | pr_info("%s: irqs det #%d, io #%d\n", driver_name, | 292 | pr_info("%s: irqs det #%d, io #%d\n", driver_name, |
293 | board->det_pin, board->irq_pin); | 293 | gpio_to_irq(board->det_pin), gpio_to_irq(board->irq_pin)); |
294 | 294 | ||
295 | cf->socket.owner = THIS_MODULE; | 295 | cf->socket.owner = THIS_MODULE; |
296 | cf->socket.dev.parent = &pdev->dev; | 296 | cf->socket.dev.parent = &pdev->dev; |
@@ -312,19 +312,19 @@ fail2: | |||
312 | fail1: | 312 | fail1: |
313 | if (cf->socket.io_offset) | 313 | if (cf->socket.io_offset) |
314 | iounmap((void __iomem *) cf->socket.io_offset); | 314 | iounmap((void __iomem *) cf->socket.io_offset); |
315 | if (board->irq_pin) { | 315 | if (gpio_is_valid(board->irq_pin)) { |
316 | free_irq(board->irq_pin, cf); | 316 | free_irq(gpio_to_irq(board->irq_pin), cf); |
317 | fail0d: | 317 | fail0d: |
318 | gpio_free(board->irq_pin); | 318 | gpio_free(board->irq_pin); |
319 | } | 319 | } |
320 | fail0c: | 320 | fail0c: |
321 | if (board->vcc_pin) | 321 | if (gpio_is_valid(board->vcc_pin)) |
322 | gpio_free(board->vcc_pin); | 322 | gpio_free(board->vcc_pin); |
323 | fail0b: | 323 | fail0b: |
324 | gpio_free(board->rst_pin); | 324 | gpio_free(board->rst_pin); |
325 | fail0a: | 325 | fail0a: |
326 | device_init_wakeup(&pdev->dev, 0); | 326 | device_init_wakeup(&pdev->dev, 0); |
327 | free_irq(board->det_pin, cf); | 327 | free_irq(gpio_to_irq(board->det_pin), cf); |
328 | fail00: | 328 | fail00: |
329 | gpio_free(board->det_pin); | 329 | gpio_free(board->det_pin); |
330 | fail0: | 330 | fail0: |
@@ -341,15 +341,15 @@ static int __exit at91_cf_remove(struct platform_device *pdev) | |||
341 | pcmcia_unregister_socket(&cf->socket); | 341 | pcmcia_unregister_socket(&cf->socket); |
342 | release_mem_region(io->start, resource_size(io)); | 342 | release_mem_region(io->start, resource_size(io)); |
343 | iounmap((void __iomem *) cf->socket.io_offset); | 343 | iounmap((void __iomem *) cf->socket.io_offset); |
344 | if (board->irq_pin) { | 344 | if (gpio_is_valid(board->irq_pin)) { |
345 | free_irq(board->irq_pin, cf); | 345 | free_irq(gpio_to_irq(board->irq_pin), cf); |
346 | gpio_free(board->irq_pin); | 346 | gpio_free(board->irq_pin); |
347 | } | 347 | } |
348 | if (board->vcc_pin) | 348 | if (gpio_is_valid(board->vcc_pin)) |
349 | gpio_free(board->vcc_pin); | 349 | gpio_free(board->vcc_pin); |
350 | gpio_free(board->rst_pin); | 350 | gpio_free(board->rst_pin); |
351 | device_init_wakeup(&pdev->dev, 0); | 351 | device_init_wakeup(&pdev->dev, 0); |
352 | free_irq(board->det_pin, cf); | 352 | free_irq(gpio_to_irq(board->det_pin), cf); |
353 | gpio_free(board->det_pin); | 353 | gpio_free(board->det_pin); |
354 | kfree(cf); | 354 | kfree(cf); |
355 | return 0; | 355 | return 0; |
@@ -363,9 +363,9 @@ static int at91_cf_suspend(struct platform_device *pdev, pm_message_t mesg) | |||
363 | struct at91_cf_data *board = cf->board; | 363 | struct at91_cf_data *board = cf->board; |
364 | 364 | ||
365 | if (device_may_wakeup(&pdev->dev)) { | 365 | if (device_may_wakeup(&pdev->dev)) { |
366 | enable_irq_wake(board->det_pin); | 366 | enable_irq_wake(gpio_to_irq(board->det_pin)); |
367 | if (board->irq_pin) | 367 | if (gpio_is_valid(board->irq_pin)) |
368 | enable_irq_wake(board->irq_pin); | 368 | enable_irq_wake(gpio_to_irq(board->irq_pin)); |
369 | } | 369 | } |
370 | return 0; | 370 | return 0; |
371 | } | 371 | } |
@@ -376,9 +376,9 @@ static int at91_cf_resume(struct platform_device *pdev) | |||
376 | struct at91_cf_data *board = cf->board; | 376 | struct at91_cf_data *board = cf->board; |
377 | 377 | ||
378 | if (device_may_wakeup(&pdev->dev)) { | 378 | if (device_may_wakeup(&pdev->dev)) { |
379 | disable_irq_wake(board->det_pin); | 379 | disable_irq_wake(gpio_to_irq(board->det_pin)); |
380 | if (board->irq_pin) | 380 | if (gpio_is_valid(board->irq_pin)) |
381 | disable_irq_wake(board->irq_pin); | 381 | disable_irq_wake(gpio_to_irq(board->irq_pin)); |
382 | } | 382 | } |
383 | 383 | ||
384 | return 0; | 384 | return 0; |
diff --git a/drivers/pcmcia/bcm63xx_pcmcia.c b/drivers/pcmcia/bcm63xx_pcmcia.c index 693577e0fefc..c2e997a570bf 100644 --- a/drivers/pcmcia/bcm63xx_pcmcia.c +++ b/drivers/pcmcia/bcm63xx_pcmcia.c | |||
@@ -475,7 +475,7 @@ static void __devexit bcm63xx_cb_exit(struct pci_dev *dev) | |||
475 | bcm63xx_cb_dev = NULL; | 475 | bcm63xx_cb_dev = NULL; |
476 | } | 476 | } |
477 | 477 | ||
478 | static struct pci_device_id bcm63xx_cb_table[] = { | 478 | static DEFINE_PCI_DEVICE_TABLE(bcm63xx_cb_table) = { |
479 | { | 479 | { |
480 | .vendor = PCI_VENDOR_ID_BROADCOM, | 480 | .vendor = PCI_VENDOR_ID_BROADCOM, |
481 | .device = BCM6348_CPU_ID, | 481 | .device = BCM6348_CPU_ID, |
diff --git a/drivers/pcmcia/bfin_cf_pcmcia.c b/drivers/pcmcia/bfin_cf_pcmcia.c index 49221395101e..ac1a2232eab9 100644 --- a/drivers/pcmcia/bfin_cf_pcmcia.c +++ b/drivers/pcmcia/bfin_cf_pcmcia.c | |||
@@ -310,18 +310,7 @@ static struct platform_driver bfin_cf_driver = { | |||
310 | .remove = __devexit_p(bfin_cf_remove), | 310 | .remove = __devexit_p(bfin_cf_remove), |
311 | }; | 311 | }; |
312 | 312 | ||
313 | static int __init bfin_cf_init(void) | 313 | module_platform_driver(bfin_cf_driver); |
314 | { | ||
315 | return platform_driver_register(&bfin_cf_driver); | ||
316 | } | ||
317 | |||
318 | static void __exit bfin_cf_exit(void) | ||
319 | { | ||
320 | platform_driver_unregister(&bfin_cf_driver); | ||
321 | } | ||
322 | |||
323 | module_init(bfin_cf_init); | ||
324 | module_exit(bfin_cf_exit); | ||
325 | 314 | ||
326 | MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); | 315 | MODULE_AUTHOR("Michael Hennerich <hennerich@blackfin.uclinux.org>"); |
327 | MODULE_DESCRIPTION("BFIN CF/PCMCIA Driver"); | 316 | MODULE_DESCRIPTION("BFIN CF/PCMCIA Driver"); |
diff --git a/drivers/pcmcia/db1xxx_ss.c b/drivers/pcmcia/db1xxx_ss.c index 5b7c22784aff..a484b1fb3382 100644 --- a/drivers/pcmcia/db1xxx_ss.c +++ b/drivers/pcmcia/db1xxx_ss.c | |||
@@ -172,12 +172,12 @@ static int db1x_pcmcia_setup_irqs(struct db1x_pcmcia_sock *sock) | |||
172 | if ((sock->board_type == BOARD_TYPE_DB1200) || | 172 | if ((sock->board_type == BOARD_TYPE_DB1200) || |
173 | (sock->board_type == BOARD_TYPE_DB1300)) { | 173 | (sock->board_type == BOARD_TYPE_DB1300)) { |
174 | ret = request_irq(sock->insert_irq, db1200_pcmcia_cdirq, | 174 | ret = request_irq(sock->insert_irq, db1200_pcmcia_cdirq, |
175 | IRQF_DISABLED, "pcmcia_insert", sock); | 175 | 0, "pcmcia_insert", sock); |
176 | if (ret) | 176 | if (ret) |
177 | goto out1; | 177 | goto out1; |
178 | 178 | ||
179 | ret = request_irq(sock->eject_irq, db1200_pcmcia_cdirq, | 179 | ret = request_irq(sock->eject_irq, db1200_pcmcia_cdirq, |
180 | IRQF_DISABLED, "pcmcia_eject", sock); | 180 | 0, "pcmcia_eject", sock); |
181 | if (ret) { | 181 | if (ret) { |
182 | free_irq(sock->insert_irq, sock); | 182 | free_irq(sock->insert_irq, sock); |
183 | goto out1; | 183 | goto out1; |
@@ -580,18 +580,7 @@ static struct platform_driver db1x_pcmcia_socket_driver = { | |||
580 | .remove = __devexit_p(db1x_pcmcia_socket_remove), | 580 | .remove = __devexit_p(db1x_pcmcia_socket_remove), |
581 | }; | 581 | }; |
582 | 582 | ||
583 | int __init db1x_pcmcia_socket_load(void) | 583 | module_platform_driver(db1x_pcmcia_socket_driver); |
584 | { | ||
585 | return platform_driver_register(&db1x_pcmcia_socket_driver); | ||
586 | } | ||
587 | |||
588 | void __exit db1x_pcmcia_socket_unload(void) | ||
589 | { | ||
590 | platform_driver_unregister(&db1x_pcmcia_socket_driver); | ||
591 | } | ||
592 | |||
593 | module_init(db1x_pcmcia_socket_load); | ||
594 | module_exit(db1x_pcmcia_socket_unload); | ||
595 | 584 | ||
596 | MODULE_LICENSE("GPL"); | 585 | MODULE_LICENSE("GPL"); |
597 | MODULE_DESCRIPTION("PCMCIA Socket Services for Alchemy Db/Pb1x00 boards"); | 586 | MODULE_DESCRIPTION("PCMCIA Socket Services for Alchemy Db/Pb1x00 boards"); |
diff --git a/drivers/pcmcia/electra_cf.c b/drivers/pcmcia/electra_cf.c index 06ad3e5e7d3d..7647d232e9e2 100644 --- a/drivers/pcmcia/electra_cf.c +++ b/drivers/pcmcia/electra_cf.c | |||
@@ -365,17 +365,7 @@ static struct platform_driver electra_cf_driver = { | |||
365 | .remove = electra_cf_remove, | 365 | .remove = electra_cf_remove, |
366 | }; | 366 | }; |
367 | 367 | ||
368 | static int __init electra_cf_init(void) | 368 | module_platform_driver(electra_cf_driver); |
369 | { | ||
370 | return platform_driver_register(&electra_cf_driver); | ||
371 | } | ||
372 | module_init(electra_cf_init); | ||
373 | |||
374 | static void __exit electra_cf_exit(void) | ||
375 | { | ||
376 | platform_driver_unregister(&electra_cf_driver); | ||
377 | } | ||
378 | module_exit(electra_cf_exit); | ||
379 | 369 | ||
380 | MODULE_LICENSE("GPL"); | 370 | MODULE_LICENSE("GPL"); |
381 | MODULE_AUTHOR ("Olof Johansson <olof@lixom.net>"); | 371 | MODULE_AUTHOR ("Olof Johansson <olof@lixom.net>"); |
diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c index 0b66bfc0e148..4e8831bdb6ef 100644 --- a/drivers/pcmcia/i82092.c +++ b/drivers/pcmcia/i82092.c | |||
@@ -25,14 +25,9 @@ | |||
25 | MODULE_LICENSE("GPL"); | 25 | MODULE_LICENSE("GPL"); |
26 | 26 | ||
27 | /* PCI core routines */ | 27 | /* PCI core routines */ |
28 | static struct pci_device_id i82092aa_pci_ids[] = { | 28 | static DEFINE_PCI_DEVICE_TABLE(i82092aa_pci_ids) = { |
29 | { | 29 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82092AA_0) }, |
30 | .vendor = PCI_VENDOR_ID_INTEL, | 30 | { } |
31 | .device = PCI_DEVICE_ID_INTEL_82092AA_0, | ||
32 | .subvendor = PCI_ANY_ID, | ||
33 | .subdevice = PCI_ANY_ID, | ||
34 | }, | ||
35 | {} | ||
36 | }; | 31 | }; |
37 | MODULE_DEVICE_TABLE(pci, i82092aa_pci_ids); | 32 | MODULE_DEVICE_TABLE(pci, i82092aa_pci_ids); |
38 | 33 | ||
diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c index a317defd616d..a3a851e49321 100644 --- a/drivers/pcmcia/m8xx_pcmcia.c +++ b/drivers/pcmcia/m8xx_pcmcia.c | |||
@@ -1303,15 +1303,4 @@ static struct platform_driver m8xx_pcmcia_driver = { | |||
1303 | .remove = m8xx_remove, | 1303 | .remove = m8xx_remove, |
1304 | }; | 1304 | }; |
1305 | 1305 | ||
1306 | static int __init m8xx_init(void) | 1306 | module_platform_driver(m8xx_pcmcia_driver); |
1307 | { | ||
1308 | return platform_driver_register(&m8xx_pcmcia_driver); | ||
1309 | } | ||
1310 | |||
1311 | static void __exit m8xx_exit(void) | ||
1312 | { | ||
1313 | platform_driver_unregister(&m8xx_pcmcia_driver); | ||
1314 | } | ||
1315 | |||
1316 | module_init(m8xx_init); | ||
1317 | module_exit(m8xx_exit); | ||
diff --git a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c index 0f8b70b27762..253e3867dec7 100644 --- a/drivers/pcmcia/pd6729.c +++ b/drivers/pcmcia/pd6729.c | |||
@@ -762,13 +762,8 @@ static void __devexit pd6729_pci_remove(struct pci_dev *dev) | |||
762 | kfree(socket); | 762 | kfree(socket); |
763 | } | 763 | } |
764 | 764 | ||
765 | static struct pci_device_id pd6729_pci_ids[] = { | 765 | static DEFINE_PCI_DEVICE_TABLE(pd6729_pci_ids) = { |
766 | { | 766 | { PCI_DEVICE(PCI_VENDOR_ID_CIRRUS, PCI_DEVICE_ID_CIRRUS_6729) }, |
767 | .vendor = PCI_VENDOR_ID_CIRRUS, | ||
768 | .device = PCI_DEVICE_ID_CIRRUS_6729, | ||
769 | .subvendor = PCI_ANY_ID, | ||
770 | .subdevice = PCI_ANY_ID, | ||
771 | }, | ||
772 | { } | 767 | { } |
773 | }; | 768 | }; |
774 | MODULE_DEVICE_TABLE(pci, pd6729_pci_ids); | 769 | MODULE_DEVICE_TABLE(pci, pd6729_pci_ids); |
diff --git a/drivers/pcmcia/pxa2xx_viper.c b/drivers/pcmcia/pxa2xx_viper.c index adfae4987a42..cb0c37ec7f24 100644 --- a/drivers/pcmcia/pxa2xx_viper.c +++ b/drivers/pcmcia/pxa2xx_viper.c | |||
@@ -177,18 +177,7 @@ static struct platform_driver viper_pcmcia_driver = { | |||
177 | .id_table = viper_pcmcia_id_table, | 177 | .id_table = viper_pcmcia_id_table, |
178 | }; | 178 | }; |
179 | 179 | ||
180 | static int __init viper_pcmcia_init(void) | 180 | module_platform_driver(viper_pcmcia_driver); |
181 | { | ||
182 | return platform_driver_register(&viper_pcmcia_driver); | ||
183 | } | ||
184 | |||
185 | static void __exit viper_pcmcia_exit(void) | ||
186 | { | ||
187 | return platform_driver_unregister(&viper_pcmcia_driver); | ||
188 | } | ||
189 | |||
190 | module_init(viper_pcmcia_init); | ||
191 | module_exit(viper_pcmcia_exit); | ||
192 | 181 | ||
193 | MODULE_DEVICE_TABLE(platform, viper_pcmcia_id_table); | 182 | MODULE_DEVICE_TABLE(platform, viper_pcmcia_id_table); |
194 | MODULE_LICENSE("GPL"); | 183 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/pcmcia/vrc4173_cardu.c b/drivers/pcmcia/vrc4173_cardu.c index c6d36b3a6ce8..cd0a315d922b 100644 --- a/drivers/pcmcia/vrc4173_cardu.c +++ b/drivers/pcmcia/vrc4173_cardu.c | |||
@@ -563,11 +563,8 @@ static int __devinit vrc4173_cardu_setup(char *options) | |||
563 | 563 | ||
564 | __setup("vrc4173_cardu=", vrc4173_cardu_setup); | 564 | __setup("vrc4173_cardu=", vrc4173_cardu_setup); |
565 | 565 | ||
566 | static struct pci_device_id vrc4173_cardu_id_table[] __devinitdata = { | 566 | static DEFINE_PCI_DEVICE_TABLE(vrc4173_cardu_id_table) = { |
567 | { .vendor = PCI_VENDOR_ID_NEC, | 567 | { PCI_DEVICE(PCI_VENDOR_ID_NEC, PCI_DEVICE_ID_NEC_NAPCCARD) }, |
568 | .device = PCI_DEVICE_ID_NEC_NAPCCARD, | ||
569 | .subvendor = PCI_ANY_ID, | ||
570 | .subdevice = PCI_ANY_ID, }, | ||
571 | {0, } | 568 | {0, } |
572 | }; | 569 | }; |
573 | 570 | ||
diff --git a/drivers/pcmcia/xxs1500_ss.c b/drivers/pcmcia/xxs1500_ss.c index 8f6698074f8e..fd5fbd10aad0 100644 --- a/drivers/pcmcia/xxs1500_ss.c +++ b/drivers/pcmcia/xxs1500_ss.c | |||
@@ -320,18 +320,7 @@ static struct platform_driver xxs1500_pcmcia_socket_driver = { | |||
320 | .remove = __devexit_p(xxs1500_pcmcia_remove), | 320 | .remove = __devexit_p(xxs1500_pcmcia_remove), |
321 | }; | 321 | }; |
322 | 322 | ||
323 | int __init xxs1500_pcmcia_socket_load(void) | 323 | module_platform_driver(xxs1500_pcmcia_socket_driver); |
324 | { | ||
325 | return platform_driver_register(&xxs1500_pcmcia_socket_driver); | ||
326 | } | ||
327 | |||
328 | void __exit xxs1500_pcmcia_socket_unload(void) | ||
329 | { | ||
330 | platform_driver_unregister(&xxs1500_pcmcia_socket_driver); | ||
331 | } | ||
332 | |||
333 | module_init(xxs1500_pcmcia_socket_load); | ||
334 | module_exit(xxs1500_pcmcia_socket_unload); | ||
335 | 324 | ||
336 | MODULE_LICENSE("GPL"); | 325 | MODULE_LICENSE("GPL"); |
337 | MODULE_DESCRIPTION("PCMCIA Socket Services for MyCable XXS1500 systems"); | 326 | MODULE_DESCRIPTION("PCMCIA Socket Services for MyCable XXS1500 systems"); |
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c index 849c0c11d2af..d07f9ac8c41d 100644 --- a/drivers/pcmcia/yenta_socket.c +++ b/drivers/pcmcia/yenta_socket.c | |||
@@ -1352,7 +1352,7 @@ static const struct dev_pm_ops yenta_pm_ops = { | |||
1352 | .driver_data = CARDBUS_TYPE_##type, \ | 1352 | .driver_data = CARDBUS_TYPE_##type, \ |
1353 | } | 1353 | } |
1354 | 1354 | ||
1355 | static struct pci_device_id yenta_table[] = { | 1355 | static DEFINE_PCI_DEVICE_TABLE(yenta_table) = { |
1356 | CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1031, TI), | 1356 | CB_ID(PCI_VENDOR_ID_TI, PCI_DEVICE_ID_TI_1031, TI), |
1357 | 1357 | ||
1358 | /* | 1358 | /* |