aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2009-11-03 04:27:34 -0500
committerDominik Brodowski <linux@dominikbrodowski.net>2009-11-28 12:03:10 -0500
commitdd2e5a156525f11754d9b1e0583f6bb49c253d62 (patch)
treef64b680eec9c4ca7da4fe635031a94a3bbf5ebee
parent6838b03fc6564ea07d0cd87ea6e198d90ab1fc3e (diff)
pcmcia: remove deprecated handle_to_dev() macro
Update remaining users and remove deprecated handle_to_dev() macro CC: Harald Welte <laforge@gnumonks.org> CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-serial@vger.kernel.org Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
-rw-r--r--drivers/char/pcmcia/cm4000_cs.c2
-rw-r--r--drivers/char/pcmcia/cm4040_cs.c6
-rw-r--r--drivers/net/pcmcia/3c574_cs.c2
-rw-r--r--drivers/net/pcmcia/3c589_cs.c2
-rw-r--r--drivers/net/pcmcia/axnet_cs.c2
-rw-r--r--drivers/net/pcmcia/com20020_cs.c2
-rw-r--r--drivers/net/pcmcia/fmvj18x_cs.c2
-rw-r--r--drivers/net/pcmcia/ibmtr_cs.c2
-rw-r--r--drivers/net/pcmcia/nmclan_cs.c2
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c2
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c2
-rw-r--r--drivers/net/pcmcia/xirc2ps_cs.c2
-rw-r--r--drivers/net/wireless/airo_cs.c2
-rw-r--r--drivers/net/wireless/atmel_cs.c4
-rw-r--r--drivers/net/wireless/hostap/hostap_cs.c2
-rw-r--r--drivers/net/wireless/libertas/if_cs.c4
-rw-r--r--drivers/net/wireless/netwave_cs.c2
-rw-r--r--drivers/net/wireless/orinoco/orinoco_cs.c2
-rw-r--r--drivers/net/wireless/orinoco/spectrum_cs.c2
-rw-r--r--drivers/net/wireless/ray_cs.c2
-rw-r--r--drivers/net/wireless/wavelan_cs.c2
-rw-r--r--drivers/net/wireless/wl3501_cs.c2
-rw-r--r--drivers/serial/serial_cs.c2
-rw-r--r--drivers/usb/host/sl811_cs.c2
-rw-r--r--include/pcmcia/ds.h3
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf.c2
-rw-r--r--sound/pcmcia/vx/vxpocket.c2
27 files changed, 30 insertions, 33 deletions
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index 1611c4fe97fc..2db4c0a29b05 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -45,7 +45,7 @@
45 45
46/* #define ATR_CSUM */ 46/* #define ATR_CSUM */
47 47
48#define reader_to_dev(x) (&handle_to_dev(x->p_dev)) 48#define reader_to_dev(x) (&x->p_dev->dev)
49 49
50/* n (debug level) is ignored */ 50/* n (debug level) is ignored */
51/* additional debug output may be enabled by re-compiling with 51/* additional debug output may be enabled by re-compiling with
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c
index 38790db561a1..a6a70e476bea 100644
--- a/drivers/char/pcmcia/cm4040_cs.c
+++ b/drivers/char/pcmcia/cm4040_cs.c
@@ -39,7 +39,7 @@
39#include "cm4040_cs.h" 39#include "cm4040_cs.h"
40 40
41 41
42#define reader_to_dev(x) (&handle_to_dev(x->p_dev)) 42#define reader_to_dev(x) (&x->p_dev->dev)
43 43
44/* n (debug level) is ignored */ 44/* n (debug level) is ignored */
45/* additional debug output may be enabled by re-compiling with 45/* additional debug output may be enabled by re-compiling with
@@ -539,7 +539,7 @@ static int cm4040_config_check(struct pcmcia_device *p_dev,
539 p_dev->io.IOAddrLines = cfg->io.flags & CISTPL_IO_LINES_MASK; 539 p_dev->io.IOAddrLines = cfg->io.flags & CISTPL_IO_LINES_MASK;
540 540
541 rc = pcmcia_request_io(p_dev, &p_dev->io); 541 rc = pcmcia_request_io(p_dev, &p_dev->io);
542 dev_printk(KERN_INFO, &handle_to_dev(p_dev), 542 dev_printk(KERN_INFO, &p_dev->dev,
543 "pcmcia_request_io returned 0x%x\n", rc); 543 "pcmcia_request_io returned 0x%x\n", rc);
544 return rc; 544 return rc;
545} 545}
@@ -561,7 +561,7 @@ static int reader_config(struct pcmcia_device *link, int devno)
561 561
562 fail_rc = pcmcia_request_configuration(link, &link->conf); 562 fail_rc = pcmcia_request_configuration(link, &link->conf);
563 if (fail_rc != 0) { 563 if (fail_rc != 0) {
564 dev_printk(KERN_INFO, &handle_to_dev(link), 564 dev_printk(KERN_INFO, &link->dev,
565 "pcmcia_request_configuration failed 0x%x\n", 565 "pcmcia_request_configuration failed 0x%x\n",
566 fail_rc); 566 fail_rc);
567 goto cs_release; 567 goto cs_release;
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c
index dbef5d9cc9db..8b65e18ab230 100644
--- a/drivers/net/pcmcia/3c574_cs.c
+++ b/drivers/net/pcmcia/3c574_cs.c
@@ -449,7 +449,7 @@ static int tc574_config(struct pcmcia_device *link)
449 } 449 }
450 450
451 link->dev_node = &lp->node; 451 link->dev_node = &lp->node;
452 SET_NETDEV_DEV(dev, &handle_to_dev(link)); 452 SET_NETDEV_DEV(dev, &link->dev);
453 453
454 if (register_netdev(dev) != 0) { 454 if (register_netdev(dev) != 0) {
455 printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n"); 455 printk(KERN_NOTICE "3c574_cs: register_netdev() failed\n");
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c
index 6eac62b7143c..c43c21ddb2d1 100644
--- a/drivers/net/pcmcia/3c589_cs.c
+++ b/drivers/net/pcmcia/3c589_cs.c
@@ -316,7 +316,7 @@ static int tc589_config(struct pcmcia_device *link)
316 printk(KERN_ERR "3c589_cs: invalid if_port requested\n"); 316 printk(KERN_ERR "3c589_cs: invalid if_port requested\n");
317 317
318 link->dev_node = &lp->node; 318 link->dev_node = &lp->node;
319 SET_NETDEV_DEV(dev, &handle_to_dev(link)); 319 SET_NETDEV_DEV(dev, &link->dev);
320 320
321 if (register_netdev(dev) != 0) { 321 if (register_netdev(dev) != 0) {
322 printk(KERN_ERR "3c589_cs: register_netdev() failed\n"); 322 printk(KERN_ERR "3c589_cs: register_netdev() failed\n");
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index 5af2ccfdb52d..0552dddd587f 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -400,7 +400,7 @@ static int axnet_config(struct pcmcia_device *link)
400 400
401 info->phy_id = (i < 32) ? i : -1; 401 info->phy_id = (i < 32) ? i : -1;
402 link->dev_node = &info->node; 402 link->dev_node = &info->node;
403 SET_NETDEV_DEV(dev, &handle_to_dev(link)); 403 SET_NETDEV_DEV(dev, &link->dev);
404 404
405 if (register_netdev(dev) != 0) { 405 if (register_netdev(dev) != 0) {
406 printk(KERN_NOTICE "axnet_cs: register_netdev() failed\n"); 406 printk(KERN_NOTICE "axnet_cs: register_netdev() failed\n");
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c
index 9a2e5006570b..51e9cb0a6d1e 100644
--- a/drivers/net/pcmcia/com20020_cs.c
+++ b/drivers/net/pcmcia/com20020_cs.c
@@ -302,7 +302,7 @@ static int com20020_config(struct pcmcia_device *link)
302 lp->card_flags = ARC_CAN_10MBIT; /* pretend all of them can 10Mbit */ 302 lp->card_flags = ARC_CAN_10MBIT; /* pretend all of them can 10Mbit */
303 303
304 link->dev_node = &info->node; 304 link->dev_node = &info->node;
305 SET_NETDEV_DEV(dev, &handle_to_dev(link)); 305 SET_NETDEV_DEV(dev, &link->dev);
306 306
307 i = com20020_found(dev, 0); /* calls register_netdev */ 307 i = com20020_found(dev, 0); /* calls register_netdev */
308 308
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index 85f7c4562707..9b5ca37c6684 100644
--- a/drivers/net/pcmcia/fmvj18x_cs.c
+++ b/drivers/net/pcmcia/fmvj18x_cs.c
@@ -532,7 +532,7 @@ static int fmvj18x_config(struct pcmcia_device *link)
532 532
533 lp->cardtype = cardtype; 533 lp->cardtype = cardtype;
534 link->dev_node = &lp->node; 534 link->dev_node = &lp->node;
535 SET_NETDEV_DEV(dev, &handle_to_dev(link)); 535 SET_NETDEV_DEV(dev, &link->dev);
536 536
537 if (register_netdev(dev) != 0) { 537 if (register_netdev(dev) != 0) {
538 printk(KERN_NOTICE "fmvj18x_cs: register_netdev() failed\n"); 538 printk(KERN_NOTICE "fmvj18x_cs: register_netdev() failed\n");
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c
index 14fe5fa35d86..76706e12d731 100644
--- a/drivers/net/pcmcia/ibmtr_cs.c
+++ b/drivers/net/pcmcia/ibmtr_cs.c
@@ -287,7 +287,7 @@ static int __devinit ibmtr_config(struct pcmcia_device *link)
287 ibmtr_hw_setup(dev, mmiobase); 287 ibmtr_hw_setup(dev, mmiobase);
288 288
289 link->dev_node = &info->node; 289 link->dev_node = &info->node;
290 SET_NETDEV_DEV(dev, &handle_to_dev(link)); 290 SET_NETDEV_DEV(dev, &link->dev);
291 291
292 i = ibmtr_probe_card(dev); 292 i = ibmtr_probe_card(dev);
293 if (i != 0) { 293 if (i != 0) {
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c
index a5363483ec6f..2d0c6f93ed8b 100644
--- a/drivers/net/pcmcia/nmclan_cs.c
+++ b/drivers/net/pcmcia/nmclan_cs.c
@@ -701,7 +701,7 @@ static int nmclan_config(struct pcmcia_device *link)
701 printk(KERN_NOTICE "nmclan_cs: invalid if_port requested\n"); 701 printk(KERN_NOTICE "nmclan_cs: invalid if_port requested\n");
702 702
703 link->dev_node = &lp->node; 703 link->dev_node = &lp->node;
704 SET_NETDEV_DEV(dev, &handle_to_dev(link)); 704 SET_NETDEV_DEV(dev, &link->dev);
705 705
706 i = register_netdev(dev); 706 i = register_netdev(dev);
707 if (i != 0) { 707 if (i != 0) {
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index d06a0ce7cb89..30baee7b86a2 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -646,7 +646,7 @@ static int pcnet_config(struct pcmcia_device *link)
646 mii_phy_probe(dev); 646 mii_phy_probe(dev);
647 647
648 link->dev_node = &info->node; 648 link->dev_node = &info->node;
649 SET_NETDEV_DEV(dev, &handle_to_dev(link)); 649 SET_NETDEV_DEV(dev, &link->dev);
650 650
651 if (register_netdev(dev) != 0) { 651 if (register_netdev(dev) != 0) {
652 printk(KERN_NOTICE "pcnet_cs: register_netdev() failed\n"); 652 printk(KERN_NOTICE "pcnet_cs: register_netdev() failed\n");
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index c6ca3764ab6d..2e795de06cb3 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -964,7 +964,7 @@ static int smc91c92_config(struct pcmcia_device *link)
964 } 964 }
965 965
966 link->dev_node = &smc->node; 966 link->dev_node = &smc->node;
967 SET_NETDEV_DEV(dev, &handle_to_dev(link)); 967 SET_NETDEV_DEV(dev, &link->dev);
968 968
969 if (register_netdev(dev) != 0) { 969 if (register_netdev(dev) != 0) {
970 printk(KERN_ERR "smc91c92_cs: register_netdev() failed\n"); 970 printk(KERN_ERR "smc91c92_cs: register_netdev() failed\n");
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index 265852ab1a2d..f75ac716390d 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -992,7 +992,7 @@ xirc2ps_config(struct pcmcia_device * link)
992 do_reset(dev, 1); /* a kludge to make the cem56 work */ 992 do_reset(dev, 1); /* a kludge to make the cem56 work */
993 993
994 link->dev_node = &local->node; 994 link->dev_node = &local->node;
995 SET_NETDEV_DEV(dev, &handle_to_dev(link)); 995 SET_NETDEV_DEV(dev, &link->dev);
996 996
997 if ((err=register_netdev(dev))) { 997 if ((err=register_netdev(dev))) {
998 printk(KNOT_XIRC "register_netdev() failed\n"); 998 printk(KNOT_XIRC "register_netdev() failed\n");
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index 34d775c18a31..7d3a96fdf5a3 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -322,7 +322,7 @@ static int airo_config(struct pcmcia_device *link)
322 goto failed; 322 goto failed;
323 ((local_info_t *)link->priv)->eth_dev = 323 ((local_info_t *)link->priv)->eth_dev =
324 init_airo_card(link->irq.AssignedIRQ, 324 init_airo_card(link->irq.AssignedIRQ,
325 link->io.BasePort1, 1, &handle_to_dev(link)); 325 link->io.BasePort1, 1, &link->dev);
326 if (!((local_info_t *)link->priv)->eth_dev) 326 if (!((local_info_t *)link->priv)->eth_dev)
327 goto failed; 327 goto failed;
328 328
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index 78385722a768..18a58b859223 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -260,7 +260,7 @@ static int atmel_config(struct pcmcia_device *link)
260 struct pcmcia_device_id *did; 260 struct pcmcia_device_id *did;
261 261
262 dev = link->priv; 262 dev = link->priv;
263 did = dev_get_drvdata(&handle_to_dev(link)); 263 did = dev_get_drvdata(&link->dev);
264 264
265 dev_dbg(&link->dev, "atmel_config\n"); 265 dev_dbg(&link->dev, "atmel_config\n");
266 266
@@ -309,7 +309,7 @@ static int atmel_config(struct pcmcia_device *link)
309 init_atmel_card(link->irq.AssignedIRQ, 309 init_atmel_card(link->irq.AssignedIRQ,
310 link->io.BasePort1, 310 link->io.BasePort1,
311 did ? did->driver_info : ATMEL_FW_TYPE_NONE, 311 did ? did->driver_info : ATMEL_FW_TYPE_NONE,
312 &handle_to_dev(link), 312 &link->dev,
313 card_present, 313 card_present,
314 link); 314 link);
315 if (!((local_info_t*)link->priv)->eth_dev) 315 if (!((local_info_t*)link->priv)->eth_dev)
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index ca3ab849ac03..243e912729b9 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -623,7 +623,7 @@ static int prism2_config(struct pcmcia_device *link)
623 623
624 /* Need to allocate net_device before requesting IRQ handler */ 624 /* Need to allocate net_device before requesting IRQ handler */
625 dev = prism2_init_local_data(&prism2_pccard_funcs, 0, 625 dev = prism2_init_local_data(&prism2_pccard_funcs, 0,
626 &handle_to_dev(link)); 626 &link->dev);
627 if (dev == NULL) 627 if (dev == NULL)
628 goto failed; 628 goto failed;
629 link->priv = dev; 629 link->priv = dev;
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index cb40c386fc77..f2b16559b686 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -590,7 +590,7 @@ static int if_cs_prog_helper(struct if_cs_card *card)
590 590
591 /* TODO: make firmware file configurable */ 591 /* TODO: make firmware file configurable */
592 ret = request_firmware(&fw, "libertas_cs_helper.fw", 592 ret = request_firmware(&fw, "libertas_cs_helper.fw",
593 &handle_to_dev(card->p_dev)); 593 &card->p_dev->dev);
594 if (ret) { 594 if (ret) {
595 lbs_pr_err("can't load helper firmware\n"); 595 lbs_pr_err("can't load helper firmware\n");
596 ret = -ENODEV; 596 ret = -ENODEV;
@@ -663,7 +663,7 @@ static int if_cs_prog_real(struct if_cs_card *card)
663 663
664 /* TODO: make firmware file configurable */ 664 /* TODO: make firmware file configurable */
665 ret = request_firmware(&fw, "libertas_cs.fw", 665 ret = request_firmware(&fw, "libertas_cs.fw",
666 &handle_to_dev(card->p_dev)); 666 &card->p_dev->dev);
667 if (ret) { 667 if (ret) {
668 lbs_pr_err("can't load firmware\n"); 668 lbs_pr_err("can't load firmware\n");
669 ret = -ENODEV; 669 ret = -ENODEV;
diff --git a/drivers/net/wireless/netwave_cs.c b/drivers/net/wireless/netwave_cs.c
index bd4eff79bd13..f5333b7d2226 100644
--- a/drivers/net/wireless/netwave_cs.c
+++ b/drivers/net/wireless/netwave_cs.c
@@ -773,7 +773,7 @@ static int netwave_pcmcia_config(struct pcmcia_device *link) {
773 773
774 dev->irq = link->irq.AssignedIRQ; 774 dev->irq = link->irq.AssignedIRQ;
775 dev->base_addr = link->io.BasePort1; 775 dev->base_addr = link->io.BasePort1;
776 SET_NETDEV_DEV(dev, &handle_to_dev(link)); 776 SET_NETDEV_DEV(dev, &link->dev);
777 777
778 if (register_netdev(dev) != 0) { 778 if (register_netdev(dev) != 0) {
779 printk(KERN_DEBUG "netwave_cs: register_netdev() failed\n"); 779 printk(KERN_DEBUG "netwave_cs: register_netdev() failed\n");
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c
index da626ec663d0..688b39823459 100644
--- a/drivers/net/wireless/orinoco/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco/orinoco_cs.c
@@ -109,7 +109,7 @@ orinoco_cs_probe(struct pcmcia_device *link)
109 struct orinoco_private *priv; 109 struct orinoco_private *priv;
110 struct orinoco_pccard *card; 110 struct orinoco_pccard *card;
111 111
112 priv = alloc_orinocodev(sizeof(*card), &handle_to_dev(link), 112 priv = alloc_orinocodev(sizeof(*card), &link->dev,
113 orinoco_cs_hard_reset, NULL); 113 orinoco_cs_hard_reset, NULL);
114 if (!priv) 114 if (!priv)
115 return -ENOMEM; 115 return -ENOMEM;
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c
index 700010e9e346..c609371d1525 100644
--- a/drivers/net/wireless/orinoco/spectrum_cs.c
+++ b/drivers/net/wireless/orinoco/spectrum_cs.c
@@ -182,7 +182,7 @@ spectrum_cs_probe(struct pcmcia_device *link)
182 struct orinoco_private *priv; 182 struct orinoco_private *priv;
183 struct orinoco_pccard *card; 183 struct orinoco_pccard *card;
184 184
185 priv = alloc_orinocodev(sizeof(*card), &handle_to_dev(link), 185 priv = alloc_orinocodev(sizeof(*card), &link->dev,
186 spectrum_cs_hard_reset, 186 spectrum_cs_hard_reset,
187 spectrum_cs_stop_firmware); 187 spectrum_cs_stop_firmware);
188 if (!priv) 188 if (!priv)
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 66e2d10cd754..5e0f4c3eac38 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -488,7 +488,7 @@ static int ray_config(struct pcmcia_device *link)
488 return -ENODEV; 488 return -ENODEV;
489 } 489 }
490 490
491 SET_NETDEV_DEV(dev, &handle_to_dev(link)); 491 SET_NETDEV_DEV(dev, &link->dev);
492 i = register_netdev(dev); 492 i = register_netdev(dev);
493 if (i != 0) { 493 if (i != 0) {
494 printk("ray_config register_netdev() failed\n"); 494 printk("ray_config register_netdev() failed\n");
diff --git a/drivers/net/wireless/wavelan_cs.c b/drivers/net/wireless/wavelan_cs.c
index f8c5166fffe0..df3579aef505 100644
--- a/drivers/net/wireless/wavelan_cs.c
+++ b/drivers/net/wireless/wavelan_cs.c
@@ -3899,7 +3899,7 @@ wv_pcmcia_config(struct pcmcia_device * link)
3899 lp->mem, dev->irq, (u_int) dev->base_addr); 3899 lp->mem, dev->irq, (u_int) dev->base_addr);
3900#endif 3900#endif
3901 3901
3902 SET_NETDEV_DEV(dev, &handle_to_dev(link)); 3902 SET_NETDEV_DEV(dev, &link->dev);
3903 i = register_netdev(dev); 3903 i = register_netdev(dev);
3904 if(i != 0) 3904 if(i != 0)
3905 { 3905 {
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index 7e8e269b4cb6..9a956c786738 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -1975,7 +1975,7 @@ static int wl3501_config(struct pcmcia_device *link)
1975 1975
1976 dev->irq = link->irq.AssignedIRQ; 1976 dev->irq = link->irq.AssignedIRQ;
1977 dev->base_addr = link->io.BasePort1; 1977 dev->base_addr = link->io.BasePort1;
1978 SET_NETDEV_DEV(dev, &handle_to_dev(link)); 1978 SET_NETDEV_DEV(dev, &link->dev);
1979 if (register_netdev(dev)) { 1979 if (register_netdev(dev)) {
1980 printk(KERN_NOTICE "wl3501_cs: register_netdev() failed\n"); 1980 printk(KERN_NOTICE "wl3501_cs: register_netdev() failed\n");
1981 goto failed; 1981 goto failed;
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index 3b31bee85761..8d651a618455 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -387,7 +387,7 @@ static int setup_serial(struct pcmcia_device *handle, struct serial_info * info,
387 port.irq = irq; 387 port.irq = irq;
388 port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ; 388 port.flags = UPF_BOOT_AUTOCONF | UPF_SKIP_TEST | UPF_SHARE_IRQ;
389 port.uartclk = 1843200; 389 port.uartclk = 1843200;
390 port.dev = &handle_to_dev(handle); 390 port.dev = &handle->dev;
391 if (buggy_uart) 391 if (buggy_uart)
392 port.flags |= UPF_BUGGY_UART; 392 port.flags |= UPF_BUGGY_UART;
393 393
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c
index 46077420dea5..f87aba6db4e8 100644
--- a/drivers/usb/host/sl811_cs.c
+++ b/drivers/usb/host/sl811_cs.c
@@ -185,7 +185,7 @@ static int sl811_cs_config_check(struct pcmcia_device *p_dev,
185 185
186static int sl811_cs_config(struct pcmcia_device *link) 186static int sl811_cs_config(struct pcmcia_device *link)
187{ 187{
188 struct device *parent = &handle_to_dev(link); 188 struct device *parent = &link->dev;
189 local_info_t *dev = link->priv; 189 local_info_t *dev = link->priv;
190 int ret; 190 int ret;
191 191
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h
index d6c55fdf8d01..d403c12f7978 100644
--- a/include/pcmcia/ds.h
+++ b/include/pcmcia/ds.h
@@ -138,9 +138,6 @@ struct pcmcia_device {
138#define to_pcmcia_dev(n) container_of(n, struct pcmcia_device, dev) 138#define to_pcmcia_dev(n) container_of(n, struct pcmcia_device, dev)
139#define to_pcmcia_drv(n) container_of(n, struct pcmcia_driver, drv) 139#define to_pcmcia_drv(n) container_of(n, struct pcmcia_driver, drv)
140 140
141/* deprecated -- don't use! */
142#define handle_to_dev(handle) (handle->dev)
143
144 141
145/* 142/*
146 * CIS access. 143 * CIS access.
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c
index 64b859925c0b..447aaaee3be6 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c
@@ -131,7 +131,7 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
131 return err; 131 return err;
132 } 132 }
133 133
134 snd_card_set_dev(card, &handle_to_dev(link)); 134 snd_card_set_dev(card, &link->dev);
135 135
136 pdacf->index = i; 136 pdacf->index = i;
137 card_list[i] = card; 137 card_list[i] = card;
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c
index 1492744ad67f..5a5db48a91a9 100644
--- a/sound/pcmcia/vx/vxpocket.c
+++ b/sound/pcmcia/vx/vxpocket.c
@@ -244,7 +244,7 @@ static int vxpocket_config(struct pcmcia_device *link)
244 if (ret) 244 if (ret)
245 goto failed; 245 goto failed;
246 246
247 chip->dev = &handle_to_dev(link); 247 chip->dev = &link->dev;
248 snd_card_set_dev(chip->card, chip->dev); 248 snd_card_set_dev(chip->card, chip->dev);
249 249
250 if (snd_vxpocket_assign_resources(chip, link->io.BasePort1, link->irq.AssignedIRQ) < 0) 250 if (snd_vxpocket_assign_resources(chip, link->io.BasePort1, link->irq.AssignedIRQ) < 0)