aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/pcmcia/driver-changes.txt6
-rw-r--r--drivers/ata/pata_pcmcia.c5
-rw-r--r--drivers/bluetooth/bluecard_cs.c5
-rw-r--r--drivers/bluetooth/bt3c_cs.c5
-rw-r--r--drivers/bluetooth/btuart_cs.c5
-rw-r--r--drivers/bluetooth/dtl1_cs.c5
-rw-r--r--drivers/char/pcmcia/cm4000_cs.c3
-rw-r--r--drivers/char/pcmcia/cm4040_cs.c5
-rw-r--r--drivers/char/pcmcia/ipwireless/main.c6
-rw-r--r--drivers/char/pcmcia/ipwireless/main.h1
-rw-r--r--drivers/char/pcmcia/ipwireless/tty.h1
-rw-r--r--drivers/char/pcmcia/synclink_cs.c10
-rw-r--r--drivers/ide/ide-cs.c6
-rw-r--r--drivers/isdn/hardware/avm/avm_cs.c5
-rw-r--r--drivers/isdn/hisax/avma1_cs.c5
-rw-r--r--drivers/isdn/hisax/elsa_cs.c8
-rw-r--r--drivers/isdn/hisax/sedlbauer_cs.c12
-rw-r--r--drivers/isdn/hisax/teles_cs.c8
-rw-r--r--drivers/mmc/host/sdricoh_cs.c1
-rw-r--r--drivers/mtd/maps/pcmciamtd.c6
-rw-r--r--drivers/net/pcmcia/3c574_cs.c5
-rw-r--r--drivers/net/pcmcia/3c589_cs.c5
-rw-r--r--drivers/net/pcmcia/axnet_cs.c10
-rw-r--r--drivers/net/pcmcia/com20020_cs.c5
-rw-r--r--drivers/net/pcmcia/fmvj18x_cs.c5
-rw-r--r--drivers/net/pcmcia/ibmtr_cs.c5
-rw-r--r--drivers/net/pcmcia/nmclan_cs.c5
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c7
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c9
-rw-r--r--drivers/net/pcmcia/xirc2ps_cs.c12
-rw-r--r--drivers/net/wireless/airo_cs.c16
-rw-r--r--drivers/net/wireless/atmel_cs.c16
-rw-r--r--drivers/net/wireless/b43/pcmcia.c5
-rw-r--r--drivers/net/wireless/hostap/hostap_cs.c10
-rw-r--r--drivers/net/wireless/libertas/if_cs.c10
-rw-r--r--drivers/net/wireless/orinoco/orinoco_cs.c12
-rw-r--r--drivers/net/wireless/orinoco/spectrum_cs.c12
-rw-r--r--drivers/net/wireless/ray_cs.c5
-rw-r--r--drivers/net/wireless/wl3501_cs.c5
-rw-r--r--drivers/parport/parport_cs.c5
-rw-r--r--drivers/pcmcia/au1000_generic.h1
-rw-r--r--drivers/pcmcia/au1000_pb1x00.c1
-rw-r--r--drivers/pcmcia/cistpl.c1
-rw-r--r--drivers/pcmcia/cs.c1
-rw-r--r--drivers/pcmcia/cs_internal.h5
-rw-r--r--drivers/pcmcia/ds.c3
-rw-r--r--drivers/pcmcia/i82092.c1
-rw-r--r--drivers/pcmcia/i82365.c1
-rw-r--r--drivers/pcmcia/m32r_cfc.c1
-rw-r--r--drivers/pcmcia/m32r_pcc.c1
-rw-r--r--drivers/pcmcia/m8xx_pcmcia.c1
-rw-r--r--drivers/pcmcia/pcmcia_cis.c1
-rw-r--r--drivers/pcmcia/pcmcia_resource.c33
-rw-r--r--drivers/pcmcia/pd6729.c1
-rw-r--r--drivers/pcmcia/rsrc_iodyn.c1
-rw-r--r--drivers/pcmcia/rsrc_mgr.c1
-rw-r--r--drivers/pcmcia/rsrc_nonstatic.c1
-rw-r--r--drivers/pcmcia/sa1100_generic.c1
-rw-r--r--drivers/pcmcia/soc_common.h1
-rw-r--r--drivers/pcmcia/socket_sysfs.c1
-rw-r--r--drivers/pcmcia/tcic.c1
-rw-r--r--drivers/pcmcia/xxs1500_ss.c1
-rw-r--r--drivers/pcmcia/yenta_socket.c1
-rw-r--r--drivers/scsi/pcmcia/aha152x_stub.c5
-rw-r--r--drivers/scsi/pcmcia/fdomain_stub.c5
-rw-r--r--drivers/scsi/pcmcia/nsp_cs.c13
-rw-r--r--drivers/scsi/pcmcia/qlogic_stub.c7
-rw-r--r--drivers/scsi/pcmcia/sym53c500_cs.c5
-rw-r--r--drivers/serial/serial_cs.c11
-rw-r--r--drivers/ssb/main.c1
-rw-r--r--drivers/ssb/pcmcia.c1
-rw-r--r--drivers/ssb/scan.c1
-rw-r--r--drivers/staging/comedi/drivers/cb_das16_cs.c11
-rw-r--r--drivers/staging/comedi/drivers/das08_cs.c17
-rw-r--r--drivers/staging/comedi/drivers/ni_daq_700.c19
-rw-r--r--drivers/staging/comedi/drivers/ni_daq_dio24.c19
-rw-r--r--drivers/staging/comedi/drivers/ni_labpc_cs.c20
-rw-r--r--drivers/staging/comedi/drivers/ni_mio_cs.c5
-rw-r--r--drivers/staging/comedi/drivers/quatech_daqp_cs.c17
-rw-r--r--drivers/staging/wlags49_h2/wl_cs.c7
-rw-r--r--drivers/staging/wlags49_h2/wl_internal.h1
-rw-r--r--drivers/telephony/ixj_pcmcia.c3
-rw-r--r--drivers/usb/host/sl811_cs.c7
-rw-r--r--include/pcmcia/cs.h35
-rw-r--r--include/pcmcia/ds.h17
-rw-r--r--include/pcmcia/ss.h1
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf.c5
-rw-r--r--sound/pcmcia/pdaudiocf/pdaudiocf.h1
-rw-r--r--sound/pcmcia/vx/vxpocket.c6
-rw-r--r--sound/pcmcia/vx/vxpocket.h1
90 files changed, 179 insertions, 395 deletions
diff --git a/Documentation/pcmcia/driver-changes.txt b/Documentation/pcmcia/driver-changes.txt
index 86e0f491f85e..62a029f24f46 100644
--- a/Documentation/pcmcia/driver-changes.txt
+++ b/Documentation/pcmcia/driver-changes.txt
@@ -1,4 +1,10 @@
1This file details changes in 2.6 which affect PCMCIA card driver authors: 1This file details changes in 2.6 which affect PCMCIA card driver authors:
2* pcmcia_request_configuration -> pcmcia_enable_device (as of 2.6.36)
3 pcmcia_request_configuration() got renamed to pcmcia_enable_device(),
4 as it mirrors pcmcia_disable_device(). Configuration settings are now
5 stored in struct pcmcia_device, e.g. in the fields config_flags,
6 config_index, config_base, vpp.
7
2* pcmcia_request_window changes (as of 2.6.36) 8* pcmcia_request_window changes (as of 2.6.36)
3 Instead of win_req_t, drivers are now requested to fill out 9 Instead of win_req_t, drivers are now requested to fill out
4 struct pcmcia_device *p_dev->resource[2,3,4,5] for up to four ioport 10 struct pcmcia_device *p_dev->resource[2,3,4,5] for up to four ioport
diff --git a/drivers/ata/pata_pcmcia.c b/drivers/ata/pata_pcmcia.c
index c2679c01188b..76da55d27e08 100644
--- a/drivers/ata/pata_pcmcia.c
+++ b/drivers/ata/pata_pcmcia.c
@@ -34,7 +34,6 @@
34#include <linux/ata.h> 34#include <linux/ata.h>
35#include <linux/libata.h> 35#include <linux/libata.h>
36 36
37#include <pcmcia/cs.h>
38#include <pcmcia/cistpl.h> 37#include <pcmcia/cistpl.h>
39#include <pcmcia/ds.h> 38#include <pcmcia/ds.h>
40#include <pcmcia/cisreg.h> 39#include <pcmcia/cisreg.h>
@@ -249,7 +248,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
249 /* Set up attributes in order to probe card and get resources */ 248 /* Set up attributes in order to probe card and get resources */
250 pdev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 249 pdev->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
251 pdev->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; 250 pdev->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
252 pdev->conf.Attributes = CONF_ENABLE_IRQ; 251 pdev->config_flags |= CONF_ENABLE_IRQ;
253 252
254 /* See if we have a manufacturer identifier. Use it to set is_kme for 253 /* See if we have a manufacturer identifier. Use it to set is_kme for
255 vendor quirks */ 254 vendor quirks */
@@ -275,7 +274,7 @@ static int pcmcia_init_one(struct pcmcia_device *pdev)
275 if (!pdev->irq) 274 if (!pdev->irq)
276 goto failed; 275 goto failed;
277 276
278 ret = pcmcia_request_configuration(pdev, &pdev->conf); 277 ret = pcmcia_enable_device(pdev);
279 if (ret) 278 if (ret)
280 goto failed; 279 goto failed;
281 280
diff --git a/drivers/bluetooth/bluecard_cs.c b/drivers/bluetooth/bluecard_cs.c
index 08f4818ad9f7..c9dd5b789d25 100644
--- a/drivers/bluetooth/bluecard_cs.c
+++ b/drivers/bluetooth/bluecard_cs.c
@@ -39,7 +39,6 @@
39#include <linux/skbuff.h> 39#include <linux/skbuff.h>
40#include <linux/io.h> 40#include <linux/io.h>
41 41
42#include <pcmcia/cs.h>
43#include <pcmcia/cistpl.h> 42#include <pcmcia/cistpl.h>
44#include <pcmcia/ciscode.h> 43#include <pcmcia/ciscode.h>
45#include <pcmcia/ds.h> 44#include <pcmcia/ds.h>
@@ -865,7 +864,7 @@ static int bluecard_probe(struct pcmcia_device *link)
865 info->p_dev = link; 864 info->p_dev = link;
866 link->priv = info; 865 link->priv = info;
867 866
868 link->conf.Attributes = CONF_ENABLE_IRQ; 867 link->config_flags |= CONF_ENABLE_IRQ;
869 868
870 return bluecard_config(link); 869 return bluecard_config(link);
871} 870}
@@ -905,7 +904,7 @@ static int bluecard_config(struct pcmcia_device *link)
905 if (i != 0) 904 if (i != 0)
906 goto failed; 905 goto failed;
907 906
908 i = pcmcia_request_configuration(link, &link->conf); 907 i = pcmcia_enable_device(link);
909 if (i != 0) 908 if (i != 0)
910 goto failed; 909 goto failed;
911 910
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c
index fb018073a5f8..3db95887cfd7 100644
--- a/drivers/bluetooth/bt3c_cs.c
+++ b/drivers/bluetooth/bt3c_cs.c
@@ -45,7 +45,6 @@
45#include <linux/device.h> 45#include <linux/device.h>
46#include <linux/firmware.h> 46#include <linux/firmware.h>
47 47
48#include <pcmcia/cs.h>
49#include <pcmcia/cistpl.h> 48#include <pcmcia/cistpl.h>
50#include <pcmcia/ciscode.h> 49#include <pcmcia/ciscode.h>
51#include <pcmcia/ds.h> 50#include <pcmcia/ds.h>
@@ -660,7 +659,7 @@ static int bt3c_probe(struct pcmcia_device *link)
660 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 659 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
661 link->resource[0]->end = 8; 660 link->resource[0]->end = 8;
662 661
663 link->conf.Attributes = CONF_ENABLE_IRQ; 662 link->config_flags |= CONF_ENABLE_IRQ;
664 663
665 return bt3c_config(link); 664 return bt3c_config(link);
666} 665}
@@ -741,7 +740,7 @@ found_port:
741 if (i != 0) 740 if (i != 0)
742 goto failed; 741 goto failed;
743 742
744 i = pcmcia_request_configuration(link, &link->conf); 743 i = pcmcia_enable_device(link);
745 if (i != 0) 744 if (i != 0)
746 goto failed; 745 goto failed;
747 746
diff --git a/drivers/bluetooth/btuart_cs.c b/drivers/bluetooth/btuart_cs.c
index 897c7c74ca14..c5c43594ae0e 100644
--- a/drivers/bluetooth/btuart_cs.c
+++ b/drivers/bluetooth/btuart_cs.c
@@ -41,7 +41,6 @@
41#include <asm/system.h> 41#include <asm/system.h>
42#include <asm/io.h> 42#include <asm/io.h>
43 43
44#include <pcmcia/cs.h>
45#include <pcmcia/cistpl.h> 44#include <pcmcia/cistpl.h>
46#include <pcmcia/ciscode.h> 45#include <pcmcia/ciscode.h>
47#include <pcmcia/ds.h> 46#include <pcmcia/ds.h>
@@ -589,7 +588,7 @@ static int btuart_probe(struct pcmcia_device *link)
589 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 588 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
590 link->resource[0]->end = 8; 589 link->resource[0]->end = 8;
591 590
592 link->conf.Attributes = CONF_ENABLE_IRQ; 591 link->config_flags |= CONF_ENABLE_IRQ;
593 592
594 return btuart_config(link); 593 return btuart_config(link);
595} 594}
@@ -670,7 +669,7 @@ found_port:
670 if (i != 0) 669 if (i != 0)
671 goto failed; 670 goto failed;
672 671
673 i = pcmcia_request_configuration(link, &link->conf); 672 i = pcmcia_enable_device(link);
674 if (i != 0) 673 if (i != 0)
675 goto failed; 674 goto failed;
676 675
diff --git a/drivers/bluetooth/dtl1_cs.c b/drivers/bluetooth/dtl1_cs.c
index b4c9a2e0a96b..38206df7206b 100644
--- a/drivers/bluetooth/dtl1_cs.c
+++ b/drivers/bluetooth/dtl1_cs.c
@@ -41,7 +41,6 @@
41#include <asm/system.h> 41#include <asm/system.h>
42#include <asm/io.h> 42#include <asm/io.h>
43 43
44#include <pcmcia/cs.h>
45#include <pcmcia/cistpl.h> 44#include <pcmcia/cistpl.h>
46#include <pcmcia/ciscode.h> 45#include <pcmcia/ciscode.h>
47#include <pcmcia/ds.h> 46#include <pcmcia/ds.h>
@@ -575,7 +574,7 @@ static int dtl1_probe(struct pcmcia_device *link)
575 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 574 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
576 link->resource[0]->end = 8; 575 link->resource[0]->end = 8;
577 576
578 link->conf.Attributes = CONF_ENABLE_IRQ; 577 link->config_flags |= CONF_ENABLE_IRQ;
579 578
580 return dtl1_config(link); 579 return dtl1_config(link);
581} 580}
@@ -619,7 +618,7 @@ static int dtl1_config(struct pcmcia_device *link)
619 if (i != 0) 618 if (i != 0)
620 goto failed; 619 goto failed;
621 620
622 i = pcmcia_request_configuration(link, &link->conf); 621 i = pcmcia_enable_device(link);
623 if (i != 0) 622 if (i != 0)
624 goto failed; 623 goto failed;
625 624
diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c
index d2accd64b3f5..75caa8c1b484 100644
--- a/drivers/char/pcmcia/cm4000_cs.c
+++ b/drivers/char/pcmcia/cm4000_cs.c
@@ -34,7 +34,6 @@
34#include <linux/uaccess.h> 34#include <linux/uaccess.h>
35#include <linux/io.h> 35#include <linux/io.h>
36 36
37#include <pcmcia/cs.h>
38#include <pcmcia/cistpl.h> 37#include <pcmcia/cistpl.h>
39#include <pcmcia/cisreg.h> 38#include <pcmcia/cisreg.h>
40#include <pcmcia/ciscode.h> 39#include <pcmcia/ciscode.h>
@@ -1767,7 +1766,7 @@ static int cm4000_config(struct pcmcia_device * link, int devno)
1767 if (pcmcia_loop_config(link, cm4000_config_check, NULL)) 1766 if (pcmcia_loop_config(link, cm4000_config_check, NULL))
1768 goto cs_release; 1767 goto cs_release;
1769 1768
1770 if (pcmcia_request_configuration(link, &link->conf)) 1769 if (pcmcia_enable_device(link))
1771 goto cs_release; 1770 goto cs_release;
1772 1771
1773 dev = link->priv; 1772 dev = link->priv;
diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c
index a32eba0afdfc..0c87b80bf641 100644
--- a/drivers/char/pcmcia/cm4040_cs.c
+++ b/drivers/char/pcmcia/cm4040_cs.c
@@ -29,7 +29,6 @@
29#include <asm/uaccess.h> 29#include <asm/uaccess.h>
30#include <asm/io.h> 30#include <asm/io.h>
31 31
32#include <pcmcia/cs.h>
33#include <pcmcia/cistpl.h> 32#include <pcmcia/cistpl.h>
34#include <pcmcia/cisreg.h> 33#include <pcmcia/cisreg.h>
35#include <pcmcia/ciscode.h> 34#include <pcmcia/ciscode.h>
@@ -547,10 +546,10 @@ static int reader_config(struct pcmcia_device *link, int devno)
547 if (pcmcia_loop_config(link, cm4040_config_check, NULL)) 546 if (pcmcia_loop_config(link, cm4040_config_check, NULL))
548 goto cs_release; 547 goto cs_release;
549 548
550 fail_rc = pcmcia_request_configuration(link, &link->conf); 549 fail_rc = pcmcia_enable_device(link);
551 if (fail_rc != 0) { 550 if (fail_rc != 0) {
552 dev_printk(KERN_INFO, &link->dev, 551 dev_printk(KERN_INFO, &link->dev,
553 "pcmcia_request_configuration failed 0x%x\n", 552 "pcmcia_enable_device failed 0x%x\n",
554 fail_rc); 553 fail_rc);
555 goto cs_release; 554 goto cs_release;
556 } 555 }
diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c
index 05c4e6834a6b..cd21b2bcdcd7 100644
--- a/drivers/char/pcmcia/ipwireless/main.c
+++ b/drivers/char/pcmcia/ipwireless/main.c
@@ -32,7 +32,6 @@
32#include <pcmcia/device_id.h> 32#include <pcmcia/device_id.h>
33#include <pcmcia/ss.h> 33#include <pcmcia/ss.h>
34#include <pcmcia/ds.h> 34#include <pcmcia/ds.h>
35#include <pcmcia/cs.h>
36 35
37static struct pcmcia_device_id ipw_ids[] = { 36static struct pcmcia_device_id ipw_ids[] = {
38 PCMCIA_DEVICE_MANF_CARD(0x02f2, 0x0100), 37 PCMCIA_DEVICE_MANF_CARD(0x02f2, 0x0100),
@@ -172,7 +171,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
172 if (ret != 0) 171 if (ret != 0)
173 return ret; 172 return ret;
174 173
175 link->conf.Attributes = CONF_ENABLE_IRQ; 174 link->config_flags |= CONF_ENABLE_IRQ;
176 175
177 INIT_WORK(&ipw->work_reboot, signalled_reboot_work); 176 INIT_WORK(&ipw->work_reboot, signalled_reboot_work);
178 177
@@ -210,8 +209,7 @@ static int config_ipwireless(struct ipw_dev *ipw)
210 * Do the RequestConfiguration last, because it enables interrupts. 209 * Do the RequestConfiguration last, because it enables interrupts.
211 * Then we don't get any interrupts before we're ready for them. 210 * Then we don't get any interrupts before we're ready for them.
212 */ 211 */
213 ret = pcmcia_request_configuration(link, &link->conf); 212 ret = pcmcia_enable_device(link);
214
215 if (ret != 0) 213 if (ret != 0)
216 goto exit; 214 goto exit;
217 215
diff --git a/drivers/char/pcmcia/ipwireless/main.h b/drivers/char/pcmcia/ipwireless/main.h
index 90402195855e..f2cbb116bccb 100644
--- a/drivers/char/pcmcia/ipwireless/main.h
+++ b/drivers/char/pcmcia/ipwireless/main.h
@@ -21,7 +21,6 @@
21#include <linux/sched.h> 21#include <linux/sched.h>
22#include <linux/types.h> 22#include <linux/types.h>
23 23
24#include <pcmcia/cs.h>
25#include <pcmcia/cistpl.h> 24#include <pcmcia/cistpl.h>
26#include <pcmcia/ds.h> 25#include <pcmcia/ds.h>
27 26
diff --git a/drivers/char/pcmcia/ipwireless/tty.h b/drivers/char/pcmcia/ipwireless/tty.h
index 3e163d4cab15..747b2d637860 100644
--- a/drivers/char/pcmcia/ipwireless/tty.h
+++ b/drivers/char/pcmcia/ipwireless/tty.h
@@ -21,7 +21,6 @@
21#include <linux/types.h> 21#include <linux/types.h>
22#include <linux/sched.h> 22#include <linux/sched.h>
23 23
24#include <pcmcia/cs.h>
25#include <pcmcia/cistpl.h> 24#include <pcmcia/cistpl.h>
26#include <pcmcia/ds.h> 25#include <pcmcia/ds.h>
27 26
diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c
index 535aa0899e9f..99feaedc53a1 100644
--- a/drivers/char/pcmcia/synclink_cs.c
+++ b/drivers/char/pcmcia/synclink_cs.c
@@ -70,7 +70,6 @@
70#include <linux/workqueue.h> 70#include <linux/workqueue.h>
71#include <linux/hdlc.h> 71#include <linux/hdlc.h>
72 72
73#include <pcmcia/cs.h>
74#include <pcmcia/cistpl.h> 73#include <pcmcia/cistpl.h>
75#include <pcmcia/cisreg.h> 74#include <pcmcia/cisreg.h>
76#include <pcmcia/ds.h> 75#include <pcmcia/ds.h>
@@ -550,8 +549,6 @@ static int mgslpc_probe(struct pcmcia_device *link)
550 549
551 /* Initialize the struct pcmcia_device structure */ 550 /* Initialize the struct pcmcia_device structure */
552 551
553 link->conf.Attributes = 0;
554
555 ret = mgslpc_config(link); 552 ret = mgslpc_config(link);
556 if (ret) 553 if (ret)
557 return ret; 554 return ret;
@@ -593,14 +590,14 @@ static int mgslpc_config(struct pcmcia_device *link)
593 if (ret != 0) 590 if (ret != 0)
594 goto failed; 591 goto failed;
595 592
596 link->conf.Attributes = CONF_ENABLE_IRQ; 593 link->config_flags |= CONF_ENABLE_IRQ;
597 link->config_index = 8; 594 link->config_index = 8;
598 link->config_regs = PRESENT_OPTION; 595 link->config_regs = PRESENT_OPTION;
599 596
600 ret = pcmcia_request_irq(link, mgslpc_isr); 597 ret = pcmcia_request_irq(link, mgslpc_isr);
601 if (ret) 598 if (ret)
602 goto failed; 599 goto failed;
603 ret = pcmcia_request_configuration(link, &link->conf); 600 ret = pcmcia_enable_device(link);
604 if (ret) 601 if (ret)
605 goto failed; 602 goto failed;
606 603
@@ -609,8 +606,7 @@ static int mgslpc_config(struct pcmcia_device *link)
609 606
610 dev_info(&link->dev, "index 0x%02x:", 607 dev_info(&link->dev, "index 0x%02x:",
611 link->config_index); 608 link->config_index);
612 if (link->conf.Attributes & CONF_ENABLE_IRQ) 609 printk(", irq %d", link->irq);
613 printk(", irq %d", link->irq);
614 if (link->resource[0]) 610 if (link->resource[0])
615 printk(", io %pR", link->resource[0]); 611 printk(", io %pR", link->resource[0]);
616 printk("\n"); 612 printk("\n");
diff --git a/drivers/ide/ide-cs.c b/drivers/ide/ide-cs.c
index 07e37876559c..87ad04925a9f 100644
--- a/drivers/ide/ide-cs.c
+++ b/drivers/ide/ide-cs.c
@@ -43,7 +43,6 @@
43#include <asm/io.h> 43#include <asm/io.h>
44#include <asm/system.h> 44#include <asm/system.h>
45 45
46#include <pcmcia/cs.h>
47#include <pcmcia/cistpl.h> 46#include <pcmcia/cistpl.h>
48#include <pcmcia/ds.h> 47#include <pcmcia/ds.h>
49#include <pcmcia/cisreg.h> 48#include <pcmcia/cisreg.h>
@@ -99,7 +98,7 @@ static int ide_probe(struct pcmcia_device *link)
99 98
100 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 99 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
101 link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; 100 link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
102 link->conf.Attributes = CONF_ENABLE_IRQ; 101 link->config_flags |= CONF_ENABLE_IRQ;
103 102
104 return ide_config(link); 103 return ide_config(link);
105} /* ide_attach */ 104} /* ide_attach */
@@ -284,7 +283,8 @@ static int ide_config(struct pcmcia_device *link)
284 283
285 if (!link->irq) 284 if (!link->irq)
286 goto failed; 285 goto failed;
287 ret = pcmcia_request_configuration(link, &link->conf); 286
287 ret = pcmcia_enable_device(link);
288 if (ret) 288 if (ret)
289 goto failed; 289 goto failed;
290 290
diff --git a/drivers/isdn/hardware/avm/avm_cs.c b/drivers/isdn/hardware/avm/avm_cs.c
index 2d8bbbf286aa..6ea5cd28d349 100644
--- a/drivers/isdn/hardware/avm/avm_cs.c
+++ b/drivers/isdn/hardware/avm/avm_cs.c
@@ -20,7 +20,6 @@
20#include <asm/io.h> 20#include <asm/io.h>
21#include <asm/system.h> 21#include <asm/system.h>
22 22
23#include <pcmcia/cs.h>
24#include <pcmcia/cistpl.h> 23#include <pcmcia/cistpl.h>
25#include <pcmcia/ciscode.h> 24#include <pcmcia/ciscode.h>
26#include <pcmcia/ds.h> 25#include <pcmcia/ds.h>
@@ -79,7 +78,7 @@ static int avmcs_probe(struct pcmcia_device *p_dev)
79 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 78 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
80 79
81 /* General socket configuration */ 80 /* General socket configuration */
82 p_dev->conf.Attributes = CONF_ENABLE_IRQ; 81 p_dev->config_flags |= CONF_ENABLE_IRQ;
83 p_dev->config_index = 1; 82 p_dev->config_index = 1;
84 p_dev->config_regs = PRESENT_OPTION; 83 p_dev->config_regs = PRESENT_OPTION;
85 84
@@ -149,7 +148,7 @@ static int avmcs_config(struct pcmcia_device *link)
149 /* 148 /*
150 * configure the PCMCIA socket 149 * configure the PCMCIA socket
151 */ 150 */
152 i = pcmcia_request_configuration(link, &link->conf); 151 i = pcmcia_enable_device(link);
153 if (i != 0) { 152 if (i != 0) {
154 pcmcia_disable_device(link); 153 pcmcia_disable_device(link);
155 break; 154 break;
diff --git a/drivers/isdn/hisax/avma1_cs.c b/drivers/isdn/hisax/avma1_cs.c
index e25f6c7376ed..5dd47ad6ecc9 100644
--- a/drivers/isdn/hisax/avma1_cs.c
+++ b/drivers/isdn/hisax/avma1_cs.c
@@ -20,7 +20,6 @@
20#include <asm/io.h> 20#include <asm/io.h>
21#include <asm/system.h> 21#include <asm/system.h>
22 22
23#include <pcmcia/cs.h>
24#include <pcmcia/cistpl.h> 23#include <pcmcia/cistpl.h>
25#include <pcmcia/ds.h> 24#include <pcmcia/ds.h>
26#include "hisax_cfg.h" 25#include "hisax_cfg.h"
@@ -84,7 +83,7 @@ static int __devinit avma1cs_probe(struct pcmcia_device *p_dev)
84 p_dev->resource[1]->flags |= IO_DATA_PATH_WIDTH_16; 83 p_dev->resource[1]->flags |= IO_DATA_PATH_WIDTH_16;
85 84
86 /* General socket configuration */ 85 /* General socket configuration */
87 p_dev->conf.Attributes = CONF_ENABLE_IRQ; 86 p_dev->config_flags |= CONF_ENABLE_IRQ;
88 p_dev->config_index = 1; 87 p_dev->config_index = 1;
89 p_dev->config_regs = PRESENT_OPTION; 88 p_dev->config_regs = PRESENT_OPTION;
90 89
@@ -160,7 +159,7 @@ static int __devinit avma1cs_config(struct pcmcia_device *link)
160 /* 159 /*
161 * configure the PCMCIA socket 160 * configure the PCMCIA socket
162 */ 161 */
163 i = pcmcia_request_configuration(link, &link->conf); 162 i = pcmcia_enable_device(link);
164 if (i != 0) { 163 if (i != 0) {
165 pcmcia_disable_device(link); 164 pcmcia_disable_device(link);
166 break; 165 break;
diff --git a/drivers/isdn/hisax/elsa_cs.c b/drivers/isdn/hisax/elsa_cs.c
index f276e8428960..368c8a213f0b 100644
--- a/drivers/isdn/hisax/elsa_cs.c
+++ b/drivers/isdn/hisax/elsa_cs.c
@@ -46,7 +46,6 @@
46#include <asm/io.h> 46#include <asm/io.h>
47#include <asm/system.h> 47#include <asm/system.h>
48 48
49#include <pcmcia/cs.h>
50#include <pcmcia/cistpl.h> 49#include <pcmcia/cistpl.h>
51#include <pcmcia/cisreg.h> 50#include <pcmcia/cisreg.h>
52#include <pcmcia/ds.h> 51#include <pcmcia/ds.h>
@@ -129,8 +128,6 @@ static int __devinit elsa_cs_probe(struct pcmcia_device *link)
129 link->resource[0]->end = 8; 128 link->resource[0]->end = 8;
130 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 129 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
131 130
132 link->conf.Attributes = CONF_ENABLE_IRQ;
133
134 return elsa_cs_config(link); 131 return elsa_cs_config(link);
135} /* elsa_cs_attach */ 132} /* elsa_cs_attach */
136 133
@@ -205,15 +202,14 @@ static int __devinit elsa_cs_config(struct pcmcia_device *link)
205 if (!link->irq) 202 if (!link->irq)
206 goto failed; 203 goto failed;
207 204
208 i = pcmcia_request_configuration(link, &link->conf); 205 i = pcmcia_enable_device(link);
209 if (i != 0) 206 if (i != 0)
210 goto failed; 207 goto failed;
211 208
212 /* Finally, report what we've done */ 209 /* Finally, report what we've done */
213 dev_info(&link->dev, "index 0x%02x: ", 210 dev_info(&link->dev, "index 0x%02x: ",
214 link->config_index); 211 link->config_index);
215 if (link->conf.Attributes & CONF_ENABLE_IRQ) 212 printk(", irq %d", link->irq);
216 printk(", irq %d", link->irq);
217 if (link->resource[0]) 213 if (link->resource[0])
218 printk(" & %pR", link->resource[0]); 214 printk(" & %pR", link->resource[0]);
219 if (link->resource[1]) 215 if (link->resource[1])
diff --git a/drivers/isdn/hisax/sedlbauer_cs.c b/drivers/isdn/hisax/sedlbauer_cs.c
index 43d0a4e97ead..791e23a75f78 100644
--- a/drivers/isdn/hisax/sedlbauer_cs.c
+++ b/drivers/isdn/hisax/sedlbauer_cs.c
@@ -46,7 +46,6 @@
46#include <asm/io.h> 46#include <asm/io.h>
47#include <asm/system.h> 47#include <asm/system.h>
48 48
49#include <pcmcia/cs.h>
50#include <pcmcia/cistpl.h> 49#include <pcmcia/cistpl.h>
51#include <pcmcia/cisreg.h> 50#include <pcmcia/cisreg.h>
52#include <pcmcia/ds.h> 51#include <pcmcia/ds.h>
@@ -132,8 +131,6 @@ static int __devinit sedlbauer_probe(struct pcmcia_device *link)
132 link->resource[0]->end = 8; 131 link->resource[0]->end = 8;
133 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 132 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
134 133
135 link->conf.Attributes = 0;
136
137 return sedlbauer_config(link); 134 return sedlbauer_config(link);
138} /* sedlbauer_attach */ 135} /* sedlbauer_attach */
139 136
@@ -175,7 +172,7 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev,
175 172
176 /* Does this card need audio output? */ 173 /* Does this card need audio output? */
177 if (cfg->flags & CISTPL_CFTABLE_AUDIO) 174 if (cfg->flags & CISTPL_CFTABLE_AUDIO)
178 p_dev->conf.Attributes |= CONF_ENABLE_SPKR; 175 p_dev->config_flags |= CONF_ENABLE_SPKR;
179 176
180 /* Use power settings for Vcc and Vpp if present */ 177 /* Use power settings for Vcc and Vpp if present */
181 /* Note that the CIS values need to be rescaled */ 178 /* Note that the CIS values need to be rescaled */
@@ -192,7 +189,7 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev,
192 else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM)) 189 else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM))
193 p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; 190 p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000;
194 191
195 p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 192 p_dev->config_flags |= CONF_ENABLE_IRQ;
196 193
197 /* IO window settings */ 194 /* IO window settings */
198 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; 195 p_dev->resource[0]->end = p_dev->resource[1]->end = 0;
@@ -247,7 +244,7 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link)
247 the I/O windows and the interrupt mapping, and putting the 244 the I/O windows and the interrupt mapping, and putting the
248 card and host interface into "Memory and IO" mode. 245 card and host interface into "Memory and IO" mode.
249 */ 246 */
250 ret = pcmcia_request_configuration(link, &link->conf); 247 ret = pcmcia_enable_device(link);
251 if (ret) 248 if (ret)
252 goto failed; 249 goto failed;
253 250
@@ -256,8 +253,7 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link)
256 link->config_index); 253 link->config_index);
257 if (link->vpp) 254 if (link->vpp)
258 printk(", Vpp %d.%d", link->vpp/10, link->vpp%10); 255 printk(", Vpp %d.%d", link->vpp/10, link->vpp%10);
259 if (link->conf.Attributes & CONF_ENABLE_IRQ) 256 printk(", irq %d", link->irq);
260 printk(", irq %d", link->irq);
261 if (link->resource[0]) 257 if (link->resource[0])
262 printk(" & %pR", link->resource[0]); 258 printk(" & %pR", link->resource[0]);
263 if (link->resource[1]) 259 if (link->resource[1])
diff --git a/drivers/isdn/hisax/teles_cs.c b/drivers/isdn/hisax/teles_cs.c
index 614afc64b5b1..2ae71e3297ba 100644
--- a/drivers/isdn/hisax/teles_cs.c
+++ b/drivers/isdn/hisax/teles_cs.c
@@ -27,7 +27,6 @@
27#include <asm/io.h> 27#include <asm/io.h>
28#include <asm/system.h> 28#include <asm/system.h>
29 29
30#include <pcmcia/cs.h>
31#include <pcmcia/cistpl.h> 30#include <pcmcia/cistpl.h>
32#include <pcmcia/cisreg.h> 31#include <pcmcia/cisreg.h>
33#include <pcmcia/ds.h> 32#include <pcmcia/ds.h>
@@ -109,7 +108,7 @@ static int __devinit teles_probe(struct pcmcia_device *link)
109 link->resource[0]->end = 96; 108 link->resource[0]->end = 96;
110 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 109 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
111 110
112 link->conf.Attributes = CONF_ENABLE_IRQ; 111 link->config_flags |= CONF_ENABLE_IRQ;
113 112
114 return teles_cs_config(link); 113 return teles_cs_config(link);
115} /* teles_attach */ 114} /* teles_attach */
@@ -185,15 +184,14 @@ static int __devinit teles_cs_config(struct pcmcia_device *link)
185 if (!link->irq) 184 if (!link->irq)
186 goto cs_failed; 185 goto cs_failed;
187 186
188 i = pcmcia_request_configuration(link, &link->conf); 187 i = pcmcia_enable_device(link);
189 if (i != 0) 188 if (i != 0)
190 goto cs_failed; 189 goto cs_failed;
191 190
192 /* Finally, report what we've done */ 191 /* Finally, report what we've done */
193 dev_info(&link->dev, "index 0x%02x:", 192 dev_info(&link->dev, "index 0x%02x:",
194 link->config_index); 193 link->config_index);
195 if (link->conf.Attributes & CONF_ENABLE_IRQ) 194 printk(", irq %d", link->irq);
196 printk(", irq %d", link->irq);
197 if (link->resource[0]) 195 if (link->resource[0])
198 printk(" & %pR", link->resource[0]); 196 printk(" & %pR", link->resource[0]);
199 if (link->resource[1]) 197 if (link->resource[1])
diff --git a/drivers/mmc/host/sdricoh_cs.c b/drivers/mmc/host/sdricoh_cs.c
index 7aa65bb2af4a..7a7273b09d9a 100644
--- a/drivers/mmc/host/sdricoh_cs.c
+++ b/drivers/mmc/host/sdricoh_cs.c
@@ -30,7 +30,6 @@
30#include <linux/ioport.h> 30#include <linux/ioport.h>
31#include <linux/scatterlist.h> 31#include <linux/scatterlist.h>
32 32
33#include <pcmcia/cs.h>
34#include <pcmcia/cistpl.h> 33#include <pcmcia/cistpl.h>
35#include <pcmcia/ds.h> 34#include <pcmcia/ds.h>
36#include <linux/io.h> 35#include <linux/io.h>
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c
index 99c7257363d6..388db9ecf222 100644
--- a/drivers/mtd/maps/pcmciamtd.c
+++ b/drivers/mtd/maps/pcmciamtd.c
@@ -16,7 +16,6 @@
16#include <asm/io.h> 16#include <asm/io.h>
17#include <asm/system.h> 17#include <asm/system.h>
18 18
19#include <pcmcia/cs.h>
20#include <pcmcia/cistpl.h> 19#include <pcmcia/cistpl.h>
21#include <pcmcia/ds.h> 20#include <pcmcia/ds.h>
22 21
@@ -568,7 +567,6 @@ static int pcmciamtd_config(struct pcmcia_device *link)
568 dev->pcmcia_map.map_priv_2 = (unsigned long)link->resource[2]; 567 dev->pcmcia_map.map_priv_2 = (unsigned long)link->resource[2];
569 568
570 dev->vpp = (vpp) ? vpp : link->socket->socket.Vpp; 569 dev->vpp = (vpp) ? vpp : link->socket->socket.Vpp;
571 link->conf.Attributes = 0;
572 if(setvpp == 2) { 570 if(setvpp == 2) {
573 link->vpp = dev->vpp; 571 link->vpp = dev->vpp;
574 } else { 572 } else {
@@ -577,7 +575,7 @@ static int pcmciamtd_config(struct pcmcia_device *link)
577 575
578 link->config_index = 0; 576 link->config_index = 0;
579 DEBUG(2, "Setting Configuration"); 577 DEBUG(2, "Setting Configuration");
580 ret = pcmcia_request_configuration(link, &link->conf); 578 ret = pcmcia_enable_device(link);
581 if (ret != 0) { 579 if (ret != 0) {
582 if (dev->win_base) { 580 if (dev->win_base) {
583 iounmap(dev->win_base); 581 iounmap(dev->win_base);
@@ -718,8 +716,6 @@ static int pcmciamtd_probe(struct pcmcia_device *link)
718 dev->p_dev = link; 716 dev->p_dev = link;
719 link->priv = dev; 717 link->priv = dev;
720 718
721 link->conf.Attributes = 0;
722
723 return pcmciamtd_config(link); 719 return pcmciamtd_config(link);
724} 720}
725 721
diff --git a/drivers/net/pcmcia/3c574_cs.c b/drivers/net/pcmcia/3c574_cs.c
index 4b670b3da378..8abce76367f8 100644
--- a/drivers/net/pcmcia/3c574_cs.c
+++ b/drivers/net/pcmcia/3c574_cs.c
@@ -87,7 +87,6 @@ earlier 3Com products.
87#include <linux/bitops.h> 87#include <linux/bitops.h>
88#include <linux/mii.h> 88#include <linux/mii.h>
89 89
90#include <pcmcia/cs.h>
91#include <pcmcia/cistpl.h> 90#include <pcmcia/cistpl.h>
92#include <pcmcia/cisreg.h> 91#include <pcmcia/cisreg.h>
93#include <pcmcia/ciscode.h> 92#include <pcmcia/ciscode.h>
@@ -280,7 +279,7 @@ static int tc574_probe(struct pcmcia_device *link)
280 spin_lock_init(&lp->window_lock); 279 spin_lock_init(&lp->window_lock);
281 link->resource[0]->end = 32; 280 link->resource[0]->end = 32;
282 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16; 281 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16;
283 link->conf.Attributes = CONF_ENABLE_IRQ; 282 link->config_flags |= CONF_ENABLE_IRQ;
284 link->config_index = 1; 283 link->config_index = 1;
285 284
286 dev->netdev_ops = &el3_netdev_ops; 285 dev->netdev_ops = &el3_netdev_ops;
@@ -351,7 +350,7 @@ static int tc574_config(struct pcmcia_device *link)
351 if (ret) 350 if (ret)
352 goto failed; 351 goto failed;
353 352
354 ret = pcmcia_request_configuration(link, &link->conf); 353 ret = pcmcia_enable_device(link);
355 if (ret) 354 if (ret)
356 goto failed; 355 goto failed;
357 356
diff --git a/drivers/net/pcmcia/3c589_cs.c b/drivers/net/pcmcia/3c589_cs.c
index 6549e2c496a0..34195c407fb2 100644
--- a/drivers/net/pcmcia/3c589_cs.c
+++ b/drivers/net/pcmcia/3c589_cs.c
@@ -41,7 +41,6 @@
41#include <linux/bitops.h> 41#include <linux/bitops.h>
42#include <linux/jiffies.h> 42#include <linux/jiffies.h>
43 43
44#include <pcmcia/cs.h>
45#include <pcmcia/cistpl.h> 44#include <pcmcia/cistpl.h>
46#include <pcmcia/cisreg.h> 45#include <pcmcia/cisreg.h>
47#include <pcmcia/ciscode.h> 46#include <pcmcia/ciscode.h>
@@ -216,7 +215,7 @@ static int tc589_probe(struct pcmcia_device *link)
216 link->resource[0]->end = 16; 215 link->resource[0]->end = 16;
217 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16; 216 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16;
218 217
219 link->conf.Attributes = CONF_ENABLE_IRQ; 218 link->config_flags |= CONF_ENABLE_IRQ;
220 link->config_index = 1; 219 link->config_index = 1;
221 220
222 dev->netdev_ops = &el3_netdev_ops; 221 dev->netdev_ops = &el3_netdev_ops;
@@ -293,7 +292,7 @@ static int tc589_config(struct pcmcia_device *link)
293 if (ret) 292 if (ret)
294 goto failed; 293 goto failed;
295 294
296 ret = pcmcia_request_configuration(link, &link->conf); 295 ret = pcmcia_enable_device(link);
297 if (ret) 296 if (ret)
298 goto failed; 297 goto failed;
299 298
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index 2c273ce6a5d8..f361d2865e34 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -39,7 +39,6 @@
39#include <linux/mii.h> 39#include <linux/mii.h>
40#include "../8390.h" 40#include "../8390.h"
41 41
42#include <pcmcia/cs.h>
43#include <pcmcia/cistpl.h> 42#include <pcmcia/cistpl.h>
44#include <pcmcia/ciscode.h> 43#include <pcmcia/ciscode.h>
45#include <pcmcia/ds.h> 44#include <pcmcia/ds.h>
@@ -166,7 +165,7 @@ static int axnet_probe(struct pcmcia_device *link)
166 info = PRIV(dev); 165 info = PRIV(dev);
167 info->p_dev = link; 166 info->p_dev = link;
168 link->priv = dev; 167 link->priv = dev;
169 link->conf.Attributes = CONF_ENABLE_IRQ; 168 link->config_flags |= CONF_ENABLE_IRQ;
170 169
171 dev->netdev_ops = &axnet_netdev_ops; 170 dev->netdev_ops = &axnet_netdev_ops;
172 171
@@ -332,11 +331,12 @@ static int axnet_config(struct pcmcia_device *link)
332 331
333 if (!link->irq) 332 if (!link->irq)
334 goto failed; 333 goto failed;
335 334
335 link->config_flags |= CONF_ENABLE_IRQ;
336 if (resource_size(link->resource[1]) == 8) 336 if (resource_size(link->resource[1]) == 8)
337 link->conf.Attributes |= CONF_ENABLE_SPKR; 337 link->config_flags |= CONF_ENABLE_SPKR;
338 338
339 ret = pcmcia_request_configuration(link, &link->conf); 339 ret = pcmcia_enable_device(link);
340 if (ret) 340 if (ret)
341 goto failed; 341 goto failed;
342 342
diff --git a/drivers/net/pcmcia/com20020_cs.c b/drivers/net/pcmcia/com20020_cs.c
index a58eafed42a5..039731bddc27 100644
--- a/drivers/net/pcmcia/com20020_cs.c
+++ b/drivers/net/pcmcia/com20020_cs.c
@@ -43,7 +43,6 @@
43#include <linux/arcdevice.h> 43#include <linux/arcdevice.h>
44#include <linux/com20020.h> 44#include <linux/com20020.h>
45 45
46#include <pcmcia/cs.h>
47#include <pcmcia/cistpl.h> 46#include <pcmcia/cistpl.h>
48#include <pcmcia/ds.h> 47#include <pcmcia/ds.h>
49 48
@@ -160,7 +159,7 @@ static int com20020_probe(struct pcmcia_device *p_dev)
160 159
161 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 160 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
162 p_dev->resource[0]->end = 16; 161 p_dev->resource[0]->end = 16;
163 p_dev->conf.Attributes = CONF_ENABLE_IRQ; 162 p_dev->config_flags |= CONF_ENABLE_IRQ;
164 163
165 info->dev = dev; 164 info->dev = dev;
166 p_dev->priv = info; 165 p_dev->priv = info;
@@ -281,7 +280,7 @@ static int com20020_config(struct pcmcia_device *link)
281 280
282 dev->irq = link->irq; 281 dev->irq = link->irq;
283 282
284 ret = pcmcia_request_configuration(link, &link->conf); 283 ret = pcmcia_enable_device(link);
285 if (ret) 284 if (ret)
286 goto failed; 285 goto failed;
287 286
diff --git a/drivers/net/pcmcia/fmvj18x_cs.c b/drivers/net/pcmcia/fmvj18x_cs.c
index 23f5333d8029..f6865adb126d 100644
--- a/drivers/net/pcmcia/fmvj18x_cs.c
+++ b/drivers/net/pcmcia/fmvj18x_cs.c
@@ -49,7 +49,6 @@
49#include <linux/ioport.h> 49#include <linux/ioport.h>
50#include <linux/crc32.h> 50#include <linux/crc32.h>
51 51
52#include <pcmcia/cs.h>
53#include <pcmcia/cistpl.h> 52#include <pcmcia/cistpl.h>
54#include <pcmcia/ciscode.h> 53#include <pcmcia/ciscode.h>
55#include <pcmcia/ds.h> 54#include <pcmcia/ds.h>
@@ -252,7 +251,7 @@ static int fmvj18x_probe(struct pcmcia_device *link)
252 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 251 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
253 252
254 /* General socket configuration */ 253 /* General socket configuration */
255 link->conf.Attributes = CONF_ENABLE_IRQ; 254 link->config_flags |= CONF_ENABLE_IRQ;
256 255
257 dev->netdev_ops = &fjn_netdev_ops; 256 dev->netdev_ops = &fjn_netdev_ops;
258 dev->watchdog_timeo = TX_TIMEOUT; 257 dev->watchdog_timeo = TX_TIMEOUT;
@@ -431,7 +430,7 @@ static int fmvj18x_config(struct pcmcia_device *link)
431 ret = pcmcia_request_irq(link, fjn_interrupt); 430 ret = pcmcia_request_irq(link, fjn_interrupt);
432 if (ret) 431 if (ret)
433 goto failed; 432 goto failed;
434 ret = pcmcia_request_configuration(link, &link->conf); 433 ret = pcmcia_enable_device(link);
435 if (ret) 434 if (ret)
436 goto failed; 435 goto failed;
437 436
diff --git a/drivers/net/pcmcia/ibmtr_cs.c b/drivers/net/pcmcia/ibmtr_cs.c
index feedeeb17a52..b298a3d98dc8 100644
--- a/drivers/net/pcmcia/ibmtr_cs.c
+++ b/drivers/net/pcmcia/ibmtr_cs.c
@@ -57,7 +57,6 @@
57#include <linux/trdevice.h> 57#include <linux/trdevice.h>
58#include <linux/ibmtr.h> 58#include <linux/ibmtr.h>
59 59
60#include <pcmcia/cs.h>
61#include <pcmcia/cistpl.h> 60#include <pcmcia/cistpl.h>
62#include <pcmcia/ds.h> 61#include <pcmcia/ds.h>
63 62
@@ -152,7 +151,7 @@ static int __devinit ibmtr_attach(struct pcmcia_device *link)
152 151
153 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 152 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
154 link->resource[0]->end = 4; 153 link->resource[0]->end = 4;
155 link->conf.Attributes = CONF_ENABLE_IRQ; 154 link->config_flags |= CONF_ENABLE_IRQ;
156 link->config_regs = PRESENT_OPTION; 155 link->config_regs = PRESENT_OPTION;
157 156
158 info->dev = dev; 157 info->dev = dev;
@@ -269,7 +268,7 @@ static int __devinit ibmtr_config(struct pcmcia_device *link)
269 resource_size(link->resource[3])); 268 resource_size(link->resource[3]));
270 ti->sram_phys = link->resource[3]->start; 269 ti->sram_phys = link->resource[3]->start;
271 270
272 ret = pcmcia_request_configuration(link, &link->conf); 271 ret = pcmcia_enable_device(link);
273 if (ret) 272 if (ret)
274 goto failed; 273 goto failed;
275 274
diff --git a/drivers/net/pcmcia/nmclan_cs.c b/drivers/net/pcmcia/nmclan_cs.c
index 98c4a6976045..51bf76de6499 100644
--- a/drivers/net/pcmcia/nmclan_cs.c
+++ b/drivers/net/pcmcia/nmclan_cs.c
@@ -146,7 +146,6 @@ Include Files
146#include <linux/ioport.h> 146#include <linux/ioport.h>
147#include <linux/bitops.h> 147#include <linux/bitops.h>
148 148
149#include <pcmcia/cs.h>
150#include <pcmcia/cisreg.h> 149#include <pcmcia/cisreg.h>
151#include <pcmcia/cistpl.h> 150#include <pcmcia/cistpl.h>
152#include <pcmcia/ds.h> 151#include <pcmcia/ds.h>
@@ -460,7 +459,7 @@ static int nmclan_probe(struct pcmcia_device *link)
460 spin_lock_init(&lp->bank_lock); 459 spin_lock_init(&lp->bank_lock);
461 link->resource[0]->end = 32; 460 link->resource[0]->end = 32;
462 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 461 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
463 link->conf.Attributes = CONF_ENABLE_IRQ; 462 link->config_flags |= CONF_ENABLE_IRQ;
464 link->config_index = 1; 463 link->config_index = 1;
465 link->config_regs = PRESENT_OPTION; 464 link->config_regs = PRESENT_OPTION;
466 465
@@ -649,7 +648,7 @@ static int nmclan_config(struct pcmcia_device *link)
649 ret = pcmcia_request_exclusive_irq(link, mace_interrupt); 648 ret = pcmcia_request_exclusive_irq(link, mace_interrupt);
650 if (ret) 649 if (ret)
651 goto failed; 650 goto failed;
652 ret = pcmcia_request_configuration(link, &link->conf); 651 ret = pcmcia_enable_device(link);
653 if (ret) 652 if (ret)
654 goto failed; 653 goto failed;
655 654
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index 68c46751f84f..4a3b6a43550f 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -42,7 +42,6 @@
42#include <linux/mii.h> 42#include <linux/mii.h>
43#include "../8390.h" 43#include "../8390.h"
44 44
45#include <pcmcia/cs.h>
46#include <pcmcia/cistpl.h> 45#include <pcmcia/cistpl.h>
47#include <pcmcia/ciscode.h> 46#include <pcmcia/ciscode.h>
48#include <pcmcia/ds.h> 47#include <pcmcia/ds.h>
@@ -260,7 +259,7 @@ static int pcnet_probe(struct pcmcia_device *link)
260 info->p_dev = link; 259 info->p_dev = link;
261 link->priv = dev; 260 link->priv = dev;
262 261
263 link->conf.Attributes = CONF_ENABLE_IRQ; 262 link->config_flags |= CONF_ENABLE_IRQ;
264 263
265 dev->netdev_ops = &pcnet_netdev_ops; 264 dev->netdev_ops = &pcnet_netdev_ops;
266 265
@@ -560,13 +559,13 @@ static hw_info_t *pcnet_try_config(struct pcmcia_device *link,
560 return NULL; 559 return NULL;
561 560
562 if (resource_size(link->resource[1]) == 8) 561 if (resource_size(link->resource[1]) == 8)
563 link->conf.Attributes |= CONF_ENABLE_SPKR; 562 link->config_flags |= CONF_ENABLE_SPKR;
564 563
565 if ((link->manf_id == MANFID_IBM) && 564 if ((link->manf_id == MANFID_IBM) &&
566 (link->card_id == PRODID_IBM_HOME_AND_AWAY)) 565 (link->card_id == PRODID_IBM_HOME_AND_AWAY))
567 link->config_index |= 0x10; 566 link->config_index |= 0x10;
568 567
569 ret = pcmcia_request_configuration(link, &link->conf); 568 ret = pcmcia_enable_device(link);
570 if (ret) 569 if (ret)
571 return NULL; 570 return NULL;
572 571
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index 59f5034e8d93..8c16ba672012 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -44,7 +44,6 @@
44#include <linux/jiffies.h> 44#include <linux/jiffies.h>
45#include <linux/firmware.h> 45#include <linux/firmware.h>
46 46
47#include <pcmcia/cs.h>
48#include <pcmcia/cistpl.h> 47#include <pcmcia/cistpl.h>
49#include <pcmcia/cisreg.h> 48#include <pcmcia/cisreg.h>
50#include <pcmcia/ciscode.h> 49#include <pcmcia/ciscode.h>
@@ -326,7 +325,7 @@ static int smc91c92_probe(struct pcmcia_device *link)
326 spin_lock_init(&smc->lock); 325 spin_lock_init(&smc->lock);
327 link->resource[0]->end = 16; 326 link->resource[0]->end = 16;
328 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 327 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
329 link->conf.Attributes = CONF_ENABLE_IRQ; 328 link->config_flags |= CONF_ENABLE_IRQ;
330 329
331 /* The SMC91c92-specific entries in the device structure. */ 330 /* The SMC91c92-specific entries in the device structure. */
332 dev->netdev_ops = &smc_netdev_ops; 331 dev->netdev_ops = &smc_netdev_ops;
@@ -444,7 +443,7 @@ static int mhz_mfc_config(struct pcmcia_device *link)
444 unsigned int offset; 443 unsigned int offset;
445 int i; 444 int i;
446 445
447 link->conf.Attributes |= CONF_ENABLE_SPKR; 446 link->config_flags |= CONF_ENABLE_SPKR;
448 link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; 447 link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
449 link->resource[1]->end = 8; 448 link->resource[1]->end = 8;
450 449
@@ -637,7 +636,7 @@ static int osi_config(struct pcmcia_device *link)
637 static const unsigned int com[4] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 }; 636 static const unsigned int com[4] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 };
638 int i, j; 637 int i, j;
639 638
640 link->conf.Attributes |= CONF_ENABLE_SPKR; 639 link->config_flags |= CONF_ENABLE_SPKR;
641 link->resource[0]->end = 64; 640 link->resource[0]->end = 64;
642 link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; 641 link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
643 link->resource[1]->end = 8; 642 link->resource[1]->end = 8;
@@ -862,7 +861,7 @@ static int smc91c92_config(struct pcmcia_device *link)
862 i = pcmcia_request_irq(link, smc_interrupt); 861 i = pcmcia_request_irq(link, smc_interrupt);
863 if (i) 862 if (i)
864 goto config_failed; 863 goto config_failed;
865 i = pcmcia_request_configuration(link, &link->conf); 864 i = pcmcia_enable_device(link);
866 if (i) 865 if (i)
867 goto config_failed; 866 goto config_failed;
868 867
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index 1c8ebf2df0c0..7a4a99b73d17 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -82,7 +82,6 @@
82#include <linux/bitops.h> 82#include <linux/bitops.h>
83#include <linux/mii.h> 83#include <linux/mii.h>
84 84
85#include <pcmcia/cs.h>
86#include <pcmcia/cistpl.h> 85#include <pcmcia/cistpl.h>
87#include <pcmcia/cisreg.h> 86#include <pcmcia/cisreg.h>
88#include <pcmcia/ciscode.h> 87#include <pcmcia/ciscode.h>
@@ -529,7 +528,7 @@ xirc2ps_probe(struct pcmcia_device *link)
529 link->priv = dev; 528 link->priv = dev;
530 529
531 /* General socket configuration */ 530 /* General socket configuration */
532 link->conf.Attributes = CONF_ENABLE_IRQ; 531 link->config_flags |= CONF_ENABLE_IRQ;
533 link->config_index = 1; 532 link->config_index = 1;
534 533
535 /* Fill in card specific entries */ 534 /* Fill in card specific entries */
@@ -811,9 +810,6 @@ xirc2ps_config(struct pcmcia_device * link)
811 if (local->modem) { 810 if (local->modem) {
812 int pass; 811 int pass;
813 812
814 if (do_sound)
815 link->conf.Attributes |= CONF_ENABLE_SPKR;
816
817 link->resource[1]->end = 8; 813 link->resource[1]->end = 8;
818 link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; 814 link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
819 if (local->dingo) { 815 if (local->dingo) {
@@ -863,7 +859,11 @@ xirc2ps_config(struct pcmcia_device * link)
863 * This actually configures the PCMCIA socket -- setting up 859 * This actually configures the PCMCIA socket -- setting up
864 * the I/O windows and the interrupt mapping. 860 * the I/O windows and the interrupt mapping.
865 */ 861 */
866 if ((err=pcmcia_request_configuration(link, &link->conf))) 862 link->config_flags |= CONF_ENABLE_IRQ;
863 if (do_sound)
864 link->config_flags |= CONF_ENABLE_SPKR;
865
866 if ((err = pcmcia_enable_device(link)))
867 goto config_error; 867 goto config_error;
868 868
869 if (local->dingo) { 869 if (local->dingo) {
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index 40f9ed760bb3..5939d0c7a5c8 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -32,7 +32,6 @@
32#include <linux/timer.h> 32#include <linux/timer.h>
33#include <linux/netdevice.h> 33#include <linux/netdevice.h>
34 34
35#include <pcmcia/cs.h>
36#include <pcmcia/cistpl.h> 35#include <pcmcia/cistpl.h>
37#include <pcmcia/cisreg.h> 36#include <pcmcia/cisreg.h>
38#include <pcmcia/ds.h> 37#include <pcmcia/ds.h>
@@ -96,15 +95,6 @@ static int airo_probe(struct pcmcia_device *p_dev)
96 95
97 dev_dbg(&p_dev->dev, "airo_attach()\n"); 96 dev_dbg(&p_dev->dev, "airo_attach()\n");
98 97
99 /*
100 General socket configuration defaults can go here. In this
101 client, we assume very little, and rely on the CIS for almost
102 everything. In most clients, many details (i.e., number, sizes,
103 and attributes of IO windows) are fixed by the nature of the
104 device, and can be hard-wired here.
105 */
106 p_dev->conf.Attributes = 0;
107
108 /* Allocate space for private device-specific data */ 98 /* Allocate space for private device-specific data */
109 local = kzalloc(sizeof(local_info_t), GFP_KERNEL); 99 local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
110 if (!local) { 100 if (!local) {
@@ -158,7 +148,7 @@ static int airo_cs_config_check(struct pcmcia_device *p_dev,
158 148
159 /* Does this card need audio output? */ 149 /* Does this card need audio output? */
160 if (cfg->flags & CISTPL_CFTABLE_AUDIO) 150 if (cfg->flags & CISTPL_CFTABLE_AUDIO)
161 p_dev->conf.Attributes |= CONF_ENABLE_SPKR; 151 p_dev->config_flags |= CONF_ENABLE_SPKR;
162 152
163 /* Use power settings for Vcc and Vpp if present */ 153 /* Use power settings for Vcc and Vpp if present */
164 /* Note that the CIS values need to be rescaled */ 154 /* Note that the CIS values need to be rescaled */
@@ -167,7 +157,7 @@ static int airo_cs_config_check(struct pcmcia_device *p_dev,
167 else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM)) 157 else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM))
168 p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; 158 p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000;
169 159
170 p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 160 p_dev->config_flags |= CONF_ENABLE_IRQ;
171 161
172 /* IO window settings */ 162 /* IO window settings */
173 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; 163 p_dev->resource[0]->end = p_dev->resource[1]->end = 0;
@@ -229,7 +219,7 @@ static int airo_config(struct pcmcia_device *link)
229 the I/O windows and the interrupt mapping, and putting the 219 the I/O windows and the interrupt mapping, and putting the
230 card and host interface into "Memory and IO" mode. 220 card and host interface into "Memory and IO" mode.
231 */ 221 */
232 ret = pcmcia_request_configuration(link, &link->conf); 222 ret = pcmcia_enable_device(link);
233 if (ret) 223 if (ret)
234 goto failed; 224 goto failed;
235 ((local_info_t *)link->priv)->eth_dev = 225 ((local_info_t *)link->priv)->eth_dev =
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index 8b75158caed7..080266eba985 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -42,7 +42,6 @@
42#include <linux/moduleparam.h> 42#include <linux/moduleparam.h>
43#include <linux/device.h> 43#include <linux/device.h>
44 44
45#include <pcmcia/cs.h>
46#include <pcmcia/cistpl.h> 45#include <pcmcia/cistpl.h>
47#include <pcmcia/cisreg.h> 46#include <pcmcia/cisreg.h>
48#include <pcmcia/ds.h> 47#include <pcmcia/ds.h>
@@ -106,15 +105,6 @@ static int atmel_probe(struct pcmcia_device *p_dev)
106 105
107 dev_dbg(&p_dev->dev, "atmel_attach()\n"); 106 dev_dbg(&p_dev->dev, "atmel_attach()\n");
108 107
109 /*
110 General socket configuration defaults can go here. In this
111 client, we assume very little, and rely on the CIS for almost
112 everything. In most clients, many details (i.e., number, sizes,
113 and attributes of IO windows) are fixed by the nature of the
114 device, and can be hard-wired here.
115 */
116 p_dev->conf.Attributes = 0;
117
118 /* Allocate space for private device-specific data */ 108 /* Allocate space for private device-specific data */
119 local = kzalloc(sizeof(local_info_t), GFP_KERNEL); 109 local = kzalloc(sizeof(local_info_t), GFP_KERNEL);
120 if (!local) { 110 if (!local) {
@@ -175,7 +165,7 @@ static int atmel_config_check(struct pcmcia_device *p_dev,
175 165
176 /* Does this card need audio output? */ 166 /* Does this card need audio output? */
177 if (cfg->flags & CISTPL_CFTABLE_AUDIO) 167 if (cfg->flags & CISTPL_CFTABLE_AUDIO)
178 p_dev->conf.Attributes |= CONF_ENABLE_SPKR; 168 p_dev->config_flags |= CONF_ENABLE_SPKR;
179 169
180 /* Use power settings for Vcc and Vpp if present */ 170 /* Use power settings for Vcc and Vpp if present */
181 /* Note that the CIS values need to be rescaled */ 171 /* Note that the CIS values need to be rescaled */
@@ -184,7 +174,7 @@ static int atmel_config_check(struct pcmcia_device *p_dev,
184 else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM)) 174 else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM))
185 p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; 175 p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000;
186 176
187 p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 177 p_dev->config_flags |= CONF_ENABLE_IRQ;
188 178
189 /* IO window settings */ 179 /* IO window settings */
190 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; 180 p_dev->resource[0]->end = p_dev->resource[1]->end = 0;
@@ -242,7 +232,7 @@ static int atmel_config(struct pcmcia_device *link)
242 the I/O windows and the interrupt mapping, and putting the 232 the I/O windows and the interrupt mapping, and putting the
243 card and host interface into "Memory and IO" mode. 233 card and host interface into "Memory and IO" mode.
244 */ 234 */
245 ret = pcmcia_request_configuration(link, &link->conf); 235 ret = pcmcia_enable_device(link);
246 if (ret) 236 if (ret)
247 goto failed; 237 goto failed;
248 238
diff --git a/drivers/net/wireless/b43/pcmcia.c b/drivers/net/wireless/b43/pcmcia.c
index 138b26fcc75c..61abab1f1c7c 100644
--- a/drivers/net/wireless/b43/pcmcia.c
+++ b/drivers/net/wireless/b43/pcmcia.c
@@ -26,7 +26,6 @@
26#include <linux/ssb/ssb.h> 26#include <linux/ssb/ssb.h>
27#include <linux/slab.h> 27#include <linux/slab.h>
28 28
29#include <pcmcia/cs.h>
30#include <pcmcia/cistpl.h> 29#include <pcmcia/cistpl.h>
31#include <pcmcia/ciscode.h> 30#include <pcmcia/ciscode.h>
32#include <pcmcia/ds.h> 31#include <pcmcia/ds.h>
@@ -72,7 +71,7 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev)
72 71
73 err = -ENODEV; 72 err = -ENODEV;
74 73
75 dev->conf.Attributes = CONF_ENABLE_IRQ; 74 dev->config_flags |= CONF_ENABLE_IRQ;
76 75
77 dev->resource[2]->flags |= WIN_ENABLE | WIN_DATA_WIDTH_16 | 76 dev->resource[2]->flags |= WIN_ENABLE | WIN_DATA_WIDTH_16 |
78 WIN_USE_WAIT; 77 WIN_USE_WAIT;
@@ -89,7 +88,7 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev)
89 if (!dev->irq) 88 if (!dev->irq)
90 goto err_disable; 89 goto err_disable;
91 90
92 res = pcmcia_request_configuration(dev, &dev->conf); 91 res = pcmcia_enable_device(dev);
93 if (res != 0) 92 if (res != 0)
94 goto err_disable; 93 goto err_disable;
95 94
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index 5704d3f9e1b7..5b0b5828b3cf 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -12,7 +12,6 @@
12#include <linux/wireless.h> 12#include <linux/wireless.h>
13#include <net/iw_handler.h> 13#include <net/iw_handler.h>
14 14
15#include <pcmcia/cs.h>
16#include <pcmcia/cistpl.h> 15#include <pcmcia/cistpl.h>
17#include <pcmcia/cisreg.h> 16#include <pcmcia/cisreg.h>
18#include <pcmcia/ds.h> 17#include <pcmcia/ds.h>
@@ -484,7 +483,7 @@ static int prism2_config_check(struct pcmcia_device *p_dev,
484 483
485 /* Does this card need audio output? */ 484 /* Does this card need audio output? */
486 if (cfg->flags & CISTPL_CFTABLE_AUDIO) 485 if (cfg->flags & CISTPL_CFTABLE_AUDIO)
487 p_dev->conf.Attributes |= CONF_ENABLE_SPKR; 486 p_dev->config_flags |= CONF_ENABLE_SPKR;
488 487
489 /* Use power settings for Vcc and Vpp if present */ 488 /* Use power settings for Vcc and Vpp if present */
490 /* Note that the CIS values need to be rescaled */ 489 /* Note that the CIS values need to be rescaled */
@@ -510,7 +509,7 @@ static int prism2_config_check(struct pcmcia_device *p_dev,
510 p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000; 509 p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000;
511 510
512 /* Do we need to allocate an interrupt? */ 511 /* Do we need to allocate an interrupt? */
513 p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 512 p_dev->config_flags |= CONF_ENABLE_IRQ;
514 513
515 /* IO window settings */ 514 /* IO window settings */
516 PDEBUG(DEBUG_EXTRA, "IO window settings: cfg->io.nwin=%d " 515 PDEBUG(DEBUG_EXTRA, "IO window settings: cfg->io.nwin=%d "
@@ -590,7 +589,7 @@ static int prism2_config(struct pcmcia_device *link)
590 * the I/O windows and the interrupt mapping, and putting the 589 * the I/O windows and the interrupt mapping, and putting the
591 * card and host interface into "Memory and IO" mode. 590 * card and host interface into "Memory and IO" mode.
592 */ 591 */
593 ret = pcmcia_request_configuration(link, &link->conf); 592 ret = pcmcia_enable_device(link);
594 if (ret) 593 if (ret)
595 goto failed_unlock; 594 goto failed_unlock;
596 595
@@ -605,8 +604,7 @@ static int prism2_config(struct pcmcia_device *link)
605 if (link->vpp) 604 if (link->vpp)
606 printk(", Vpp %d.%d", link->vpp / 10, 605 printk(", Vpp %d.%d", link->vpp / 10,
607 link->vpp % 10); 606 link->vpp % 10);
608 if (link->conf.Attributes & CONF_ENABLE_IRQ) 607 printk(", irq %d", link->irq);
609 printk(", irq %d", link->irq);
610 if (link->resource[0]) 608 if (link->resource[0])
611 printk(" & %pR", link->resource[0]); 609 printk(" & %pR", link->resource[0]);
612 if (link->resource[1]) 610 if (link->resource[1])
diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c
index 814b7faaa365..6020c19b1bdb 100644
--- a/drivers/net/wireless/libertas/if_cs.c
+++ b/drivers/net/wireless/libertas/if_cs.c
@@ -28,7 +28,6 @@
28#include <linux/firmware.h> 28#include <linux/firmware.h>
29#include <linux/netdevice.h> 29#include <linux/netdevice.h>
30 30
31#include <pcmcia/cs.h>
32#include <pcmcia/cistpl.h> 31#include <pcmcia/cistpl.h>
33#include <pcmcia/ds.h> 32#include <pcmcia/ds.h>
34 33
@@ -806,7 +805,7 @@ static int if_cs_ioprobe(struct pcmcia_device *p_dev,
806 p_dev->resource[0]->end = cfg->io.win[0].len; 805 p_dev->resource[0]->end = cfg->io.win[0].len;
807 806
808 /* Do we need to allocate an interrupt? */ 807 /* Do we need to allocate an interrupt? */
809 p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 808 p_dev->config_flags |= CONF_ENABLE_IRQ;
810 809
811 /* IO window settings */ 810 /* IO window settings */
812 if (cfg->io.nwin != 1) { 811 if (cfg->io.nwin != 1) {
@@ -835,14 +834,11 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
835 card->p_dev = p_dev; 834 card->p_dev = p_dev;
836 p_dev->priv = card; 835 p_dev->priv = card;
837 836
838 p_dev->conf.Attributes = 0;
839
840 if (pcmcia_loop_config(p_dev, if_cs_ioprobe, NULL)) { 837 if (pcmcia_loop_config(p_dev, if_cs_ioprobe, NULL)) {
841 lbs_pr_err("error in pcmcia_loop_config\n"); 838 lbs_pr_err("error in pcmcia_loop_config\n");
842 goto out1; 839 goto out1;
843 } 840 }
844 841
845
846 /* 842 /*
847 * Allocate an interrupt line. Note that this does not assign 843 * Allocate an interrupt line. Note that this does not assign
848 * a handler to the interrupt, unless the 'Handler' member of 844 * a handler to the interrupt, unless the 'Handler' member of
@@ -865,9 +861,9 @@ static int if_cs_probe(struct pcmcia_device *p_dev)
865 * the I/O windows and the interrupt mapping, and putting the 861 * the I/O windows and the interrupt mapping, and putting the
866 * card and host interface into "Memory and IO" mode. 862 * card and host interface into "Memory and IO" mode.
867 */ 863 */
868 ret = pcmcia_request_configuration(p_dev, &p_dev->conf); 864 ret = pcmcia_enable_device(p_dev);
869 if (ret) { 865 if (ret) {
870 lbs_pr_err("error in pcmcia_request_configuration\n"); 866 lbs_pr_err("error in pcmcia_enable_device\n");
871 goto out2; 867 goto out2;
872 } 868 }
873 869
diff --git a/drivers/net/wireless/orinoco/orinoco_cs.c b/drivers/net/wireless/orinoco/orinoco_cs.c
index 1147d6bd4733..00316a1a1092 100644
--- a/drivers/net/wireless/orinoco/orinoco_cs.c
+++ b/drivers/net/wireless/orinoco/orinoco_cs.c
@@ -17,7 +17,6 @@
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18#include <linux/init.h> 18#include <linux/init.h>
19#include <linux/delay.h> 19#include <linux/delay.h>
20#include <pcmcia/cs.h>
21#include <pcmcia/cistpl.h> 20#include <pcmcia/cistpl.h>
22#include <pcmcia/cisreg.h> 21#include <pcmcia/cisreg.h>
23#include <pcmcia/ds.h> 22#include <pcmcia/ds.h>
@@ -117,13 +116,6 @@ orinoco_cs_probe(struct pcmcia_device *link)
117 card->p_dev = link; 116 card->p_dev = link;
118 link->priv = priv; 117 link->priv = priv;
119 118
120 /* General socket configuration defaults can go here. In this
121 * client, we assume very little, and rely on the CIS for
122 * almost everything. In most clients, many details (i.e.,
123 * number, sizes, and attributes of IO windows) are fixed by
124 * the nature of the device, and can be hard-wired here. */
125 link->conf.Attributes = 0;
126
127 return orinoco_cs_config(link); 119 return orinoco_cs_config(link);
128} /* orinoco_cs_attach */ 120} /* orinoco_cs_attach */
129 121
@@ -187,7 +179,7 @@ static int orinoco_cs_config_check(struct pcmcia_device *p_dev,
187 dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000; 179 dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000;
188 180
189 /* Do we need to allocate an interrupt? */ 181 /* Do we need to allocate an interrupt? */
190 p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 182 p_dev->config_flags |= CONF_ENABLE_IRQ;
191 183
192 /* IO window settings */ 184 /* IO window settings */
193 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; 185 p_dev->resource[0]->end = p_dev->resource[1]->end = 0;
@@ -266,7 +258,7 @@ orinoco_cs_config(struct pcmcia_device *link)
266 * the I/O windows and the interrupt mapping, and putting the 258 * the I/O windows and the interrupt mapping, and putting the
267 * card and host interface into "Memory and IO" mode. 259 * card and host interface into "Memory and IO" mode.
268 */ 260 */
269 ret = pcmcia_request_configuration(link, &link->conf); 261 ret = pcmcia_enable_device(link);
270 if (ret) 262 if (ret)
271 goto failed; 263 goto failed;
272 264
diff --git a/drivers/net/wireless/orinoco/spectrum_cs.c b/drivers/net/wireless/orinoco/spectrum_cs.c
index 20b08ab87655..ca2c6c0c5576 100644
--- a/drivers/net/wireless/orinoco/spectrum_cs.c
+++ b/drivers/net/wireless/orinoco/spectrum_cs.c
@@ -25,7 +25,6 @@
25#include <linux/kernel.h> 25#include <linux/kernel.h>
26#include <linux/init.h> 26#include <linux/init.h>
27#include <linux/delay.h> 27#include <linux/delay.h>
28#include <pcmcia/cs.h>
29#include <pcmcia/cistpl.h> 28#include <pcmcia/cistpl.h>
30#include <pcmcia/cisreg.h> 29#include <pcmcia/cisreg.h>
31#include <pcmcia/ds.h> 30#include <pcmcia/ds.h>
@@ -179,13 +178,6 @@ spectrum_cs_probe(struct pcmcia_device *link)
179 card->p_dev = link; 178 card->p_dev = link;
180 link->priv = priv; 179 link->priv = priv;
181 180
182 /* General socket configuration defaults can go here. In this
183 * client, we assume very little, and rely on the CIS for
184 * almost everything. In most clients, many details (i.e.,
185 * number, sizes, and attributes of IO windows) are fixed by
186 * the nature of the device, and can be hard-wired here. */
187 link->conf.Attributes = 0;
188
189 return spectrum_cs_config(link); 181 return spectrum_cs_config(link);
190} /* spectrum_cs_attach */ 182} /* spectrum_cs_attach */
191 183
@@ -249,7 +241,7 @@ static int spectrum_cs_config_check(struct pcmcia_device *p_dev,
249 dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000; 241 dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000;
250 242
251 /* Do we need to allocate an interrupt? */ 243 /* Do we need to allocate an interrupt? */
252 p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 244 p_dev->config_flags |= CONF_ENABLE_IRQ;
253 245
254 /* IO window settings */ 246 /* IO window settings */
255 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; 247 p_dev->resource[0]->end = p_dev->resource[1]->end = 0;
@@ -329,7 +321,7 @@ spectrum_cs_config(struct pcmcia_device *link)
329 * the I/O windows and the interrupt mapping, and putting the 321 * the I/O windows and the interrupt mapping, and putting the
330 * card and host interface into "Memory and IO" mode. 322 * card and host interface into "Memory and IO" mode.
331 */ 323 */
332 ret = pcmcia_request_configuration(link, &link->conf); 324 ret = pcmcia_enable_device(link);
333 if (ret) 325 if (ret)
334 goto failed; 326 goto failed;
335 327
diff --git a/drivers/net/wireless/ray_cs.c b/drivers/net/wireless/ray_cs.c
index 7fb66cc1e9fd..1457f34efa9a 100644
--- a/drivers/net/wireless/ray_cs.c
+++ b/drivers/net/wireless/ray_cs.c
@@ -46,7 +46,6 @@
46#include <linux/ethtool.h> 46#include <linux/ethtool.h>
47#include <linux/ieee80211.h> 47#include <linux/ieee80211.h>
48 48
49#include <pcmcia/cs.h>
50#include <pcmcia/cistpl.h> 49#include <pcmcia/cistpl.h>
51#include <pcmcia/cisreg.h> 50#include <pcmcia/cisreg.h>
52#include <pcmcia/ds.h> 51#include <pcmcia/ds.h>
@@ -318,7 +317,7 @@ static int ray_probe(struct pcmcia_device *p_dev)
318 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 317 p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
319 318
320 /* General socket configuration */ 319 /* General socket configuration */
321 p_dev->conf.Attributes = CONF_ENABLE_IRQ; 320 p_dev->config_flags |= CONF_ENABLE_IRQ;
322 p_dev->config_index = 1; 321 p_dev->config_index = 1;
323 322
324 p_dev->priv = dev; 323 p_dev->priv = dev;
@@ -413,7 +412,7 @@ static int ray_config(struct pcmcia_device *link)
413 /* This actually configures the PCMCIA socket -- setting up 412 /* This actually configures the PCMCIA socket -- setting up
414 the I/O windows and the interrupt mapping. 413 the I/O windows and the interrupt mapping.
415 */ 414 */
416 ret = pcmcia_request_configuration(link, &link->conf); 415 ret = pcmcia_enable_device(link);
417 if (ret) 416 if (ret)
418 goto failed; 417 goto failed;
419 418
diff --git a/drivers/net/wireless/wl3501_cs.c b/drivers/net/wireless/wl3501_cs.c
index 3947cf8e63c5..101b6ffd560e 100644
--- a/drivers/net/wireless/wl3501_cs.c
+++ b/drivers/net/wireless/wl3501_cs.c
@@ -48,7 +48,6 @@
48 48
49#include <net/iw_handler.h> 49#include <net/iw_handler.h>
50 50
51#include <pcmcia/cs.h>
52#include <pcmcia/cistpl.h> 51#include <pcmcia/cistpl.h>
53#include <pcmcia/cisreg.h> 52#include <pcmcia/cisreg.h>
54#include <pcmcia/ds.h> 53#include <pcmcia/ds.h>
@@ -1888,7 +1887,7 @@ static int wl3501_probe(struct pcmcia_device *p_dev)
1888 p_dev->resource[0]->flags = IO_DATA_PATH_WIDTH_8; 1887 p_dev->resource[0]->flags = IO_DATA_PATH_WIDTH_8;
1889 1888
1890 /* General socket configuration */ 1889 /* General socket configuration */
1891 p_dev->conf.Attributes = CONF_ENABLE_IRQ; 1890 p_dev->config_flags = CONF_ENABLE_IRQ;
1892 p_dev->config_index = 1; 1891 p_dev->config_index = 1;
1893 1892
1894 dev = alloc_etherdev(sizeof(struct wl3501_card)); 1893 dev = alloc_etherdev(sizeof(struct wl3501_card));
@@ -1954,7 +1953,7 @@ static int wl3501_config(struct pcmcia_device *link)
1954 /* This actually configures the PCMCIA socket -- setting up the I/O 1953 /* This actually configures the PCMCIA socket -- setting up the I/O
1955 * windows and the interrupt mapping. */ 1954 * windows and the interrupt mapping. */
1956 1955
1957 ret = pcmcia_request_configuration(link, &link->conf); 1956 ret = pcmcia_enable_device(link);
1958 if (ret) 1957 if (ret)
1959 goto failed; 1958 goto failed;
1960 1959
diff --git a/drivers/parport/parport_cs.c b/drivers/parport/parport_cs.c
index 8faf634987e3..63b3d3c18c34 100644
--- a/drivers/parport/parport_cs.c
+++ b/drivers/parport/parport_cs.c
@@ -48,7 +48,6 @@
48#include <linux/parport.h> 48#include <linux/parport.h>
49#include <linux/parport_pc.h> 49#include <linux/parport_pc.h>
50 50
51#include <pcmcia/cs.h>
52#include <pcmcia/cistpl.h> 51#include <pcmcia/cistpl.h>
53#include <pcmcia/ds.h> 52#include <pcmcia/ds.h>
54#include <pcmcia/cisreg.h> 53#include <pcmcia/cisreg.h>
@@ -103,7 +102,7 @@ static int parport_probe(struct pcmcia_device *link)
103 102
104 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; 103 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
105 link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8; 104 link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
106 link->conf.Attributes = CONF_ENABLE_IRQ; 105 link->config_flags |= CONF_ENABLE_IRQ;
107 106
108 return parport_config(link); 107 return parport_config(link);
109} /* parport_attach */ 108} /* parport_attach */
@@ -172,7 +171,7 @@ static int parport_config(struct pcmcia_device *link)
172 171
173 if (!link->irq) 172 if (!link->irq)
174 goto failed; 173 goto failed;
175 ret = pcmcia_request_configuration(link, &link->conf); 174 ret = pcmcia_enable_device(link);
176 if (ret) 175 if (ret)
177 goto failed; 176 goto failed;
178 177
diff --git a/drivers/pcmcia/au1000_generic.h b/drivers/pcmcia/au1000_generic.h
index 67530cefcf3c..5c36bda2963b 100644
--- a/drivers/pcmcia/au1000_generic.h
+++ b/drivers/pcmcia/au1000_generic.h
@@ -23,7 +23,6 @@
23 23
24/* include the world */ 24/* include the world */
25 25
26#include <pcmcia/cs.h>
27#include <pcmcia/ss.h> 26#include <pcmcia/ss.h>
28#include <pcmcia/cistpl.h> 27#include <pcmcia/cistpl.h>
29#include "cs_internal.h" 28#include "cs_internal.h"
diff --git a/drivers/pcmcia/au1000_pb1x00.c b/drivers/pcmcia/au1000_pb1x00.c
index 807f2d75dad3..b2396647a165 100644
--- a/drivers/pcmcia/au1000_pb1x00.c
+++ b/drivers/pcmcia/au1000_pb1x00.c
@@ -31,7 +31,6 @@
31#include <linux/proc_fs.h> 31#include <linux/proc_fs.h>
32#include <linux/types.h> 32#include <linux/types.h>
33 33
34#include <pcmcia/cs.h>
35#include <pcmcia/ss.h> 34#include <pcmcia/ss.h>
36#include <pcmcia/cistpl.h> 35#include <pcmcia/cistpl.h>
37 36
diff --git a/drivers/pcmcia/cistpl.c b/drivers/pcmcia/cistpl.c
index 91414a0ddc44..884a984216fe 100644
--- a/drivers/pcmcia/cistpl.c
+++ b/drivers/pcmcia/cistpl.c
@@ -28,7 +28,6 @@
28#include <asm/unaligned.h> 28#include <asm/unaligned.h>
29 29
30#include <pcmcia/ss.h> 30#include <pcmcia/ss.h>
31#include <pcmcia/cs.h>
32#include <pcmcia/cisreg.h> 31#include <pcmcia/cisreg.h>
33#include <pcmcia/cistpl.h> 32#include <pcmcia/cistpl.h>
34#include "cs_internal.h" 33#include "cs_internal.h"
diff --git a/drivers/pcmcia/cs.c b/drivers/pcmcia/cs.c
index 2ec8ac97445c..d8189d4061fc 100644
--- a/drivers/pcmcia/cs.c
+++ b/drivers/pcmcia/cs.c
@@ -33,7 +33,6 @@
33#include <asm/irq.h> 33#include <asm/irq.h>
34 34
35#include <pcmcia/ss.h> 35#include <pcmcia/ss.h>
36#include <pcmcia/cs.h>
37#include <pcmcia/cistpl.h> 36#include <pcmcia/cistpl.h>
38#include <pcmcia/cisreg.h> 37#include <pcmcia/cisreg.h>
39#include <pcmcia/ds.h> 38#include <pcmcia/ds.h>
diff --git a/drivers/pcmcia/cs_internal.h b/drivers/pcmcia/cs_internal.h
index 42eef437afd4..7f1953f78b12 100644
--- a/drivers/pcmcia/cs_internal.h
+++ b/drivers/pcmcia/cs_internal.h
@@ -33,14 +33,9 @@
33typedef struct config_t { 33typedef struct config_t {
34 struct kref ref; 34 struct kref ref;
35 unsigned int state; 35 unsigned int state;
36 unsigned int Attributes;
37 36
38 struct resource io[MAX_IO_WIN]; /* io ports */ 37 struct resource io[MAX_IO_WIN]; /* io ports */
39 struct resource mem[MAX_WIN]; /* mem areas */ 38 struct resource mem[MAX_WIN]; /* mem areas */
40
41 struct {
42 u_int Attributes;
43 } irq;
44} config_t; 39} config_t;
45 40
46 41
diff --git a/drivers/pcmcia/ds.c b/drivers/pcmcia/ds.c
index 00db60053f93..dd43bd33a9e3 100644
--- a/drivers/pcmcia/ds.c
+++ b/drivers/pcmcia/ds.c
@@ -26,7 +26,6 @@
26#include <linux/dma-mapping.h> 26#include <linux/dma-mapping.h>
27#include <linux/slab.h> 27#include <linux/slab.h>
28 28
29#include <pcmcia/cs.h>
30#include <pcmcia/cistpl.h> 29#include <pcmcia/cistpl.h>
31#include <pcmcia/ds.h> 30#include <pcmcia/ds.h>
32#include <pcmcia/ss.h> 31#include <pcmcia/ss.h>
@@ -1178,7 +1177,7 @@ static int pcmcia_dev_resume(struct device *dev)
1178 1177
1179 if (p_dev->device_no == p_dev->func) { 1178 if (p_dev->device_no == p_dev->func) {
1180 dev_dbg(dev, "requesting configuration\n"); 1179 dev_dbg(dev, "requesting configuration\n");
1181 ret = pcmcia_request_configuration(p_dev, &p_dev->conf); 1180 ret = pcmcia_enable_device(p_dev);
1182 if (ret) 1181 if (ret)
1183 goto out; 1182 goto out;
1184 } 1183 }
diff --git a/drivers/pcmcia/i82092.c b/drivers/pcmcia/i82092.c
index 05d0879ce935..fc7906eaf228 100644
--- a/drivers/pcmcia/i82092.c
+++ b/drivers/pcmcia/i82092.c
@@ -16,7 +16,6 @@
16#include <linux/device.h> 16#include <linux/device.h>
17 17
18#include <pcmcia/ss.h> 18#include <pcmcia/ss.h>
19#include <pcmcia/cs.h>
20 19
21#include <asm/system.h> 20#include <asm/system.h>
22#include <asm/io.h> 21#include <asm/io.h>
diff --git a/drivers/pcmcia/i82365.c b/drivers/pcmcia/i82365.c
index 61746bd598b3..72a033a2acdb 100644
--- a/drivers/pcmcia/i82365.c
+++ b/drivers/pcmcia/i82365.c
@@ -51,7 +51,6 @@
51#include <asm/system.h> 51#include <asm/system.h>
52 52
53#include <pcmcia/ss.h> 53#include <pcmcia/ss.h>
54#include <pcmcia/cs.h>
55 54
56#include <linux/isapnp.h> 55#include <linux/isapnp.h>
57 56
diff --git a/drivers/pcmcia/m32r_cfc.c b/drivers/pcmcia/m32r_cfc.c
index 24de49925863..2adb0106a039 100644
--- a/drivers/pcmcia/m32r_cfc.c
+++ b/drivers/pcmcia/m32r_cfc.c
@@ -27,7 +27,6 @@
27#include <asm/system.h> 27#include <asm/system.h>
28 28
29#include <pcmcia/ss.h> 29#include <pcmcia/ss.h>
30#include <pcmcia/cs.h>
31 30
32#undef MAX_IO_WIN /* FIXME */ 31#undef MAX_IO_WIN /* FIXME */
33#define MAX_IO_WIN 1 32#define MAX_IO_WIN 1
diff --git a/drivers/pcmcia/m32r_pcc.c b/drivers/pcmcia/m32r_pcc.c
index 8e4723844ad3..1511ff71c87b 100644
--- a/drivers/pcmcia/m32r_pcc.c
+++ b/drivers/pcmcia/m32r_pcc.c
@@ -28,7 +28,6 @@
28#include <asm/addrspace.h> 28#include <asm/addrspace.h>
29 29
30#include <pcmcia/ss.h> 30#include <pcmcia/ss.h>
31#include <pcmcia/cs.h>
32 31
33/* XXX: should be moved into asm/irq.h */ 32/* XXX: should be moved into asm/irq.h */
34#define PCC0_IRQ 24 33#define PCC0_IRQ 24
diff --git a/drivers/pcmcia/m8xx_pcmcia.c b/drivers/pcmcia/m8xx_pcmcia.c
index f0ecad99ce81..99d4f23cb435 100644
--- a/drivers/pcmcia/m8xx_pcmcia.c
+++ b/drivers/pcmcia/m8xx_pcmcia.c
@@ -59,7 +59,6 @@
59#include <asm/irq.h> 59#include <asm/irq.h>
60#include <asm/fs_pd.h> 60#include <asm/fs_pd.h>
61 61
62#include <pcmcia/cs.h>
63#include <pcmcia/ss.h> 62#include <pcmcia/ss.h>
64 63
65#define pcmcia_info(args...) printk(KERN_INFO "m8xx_pcmcia: "args) 64#define pcmcia_info(args...) printk(KERN_INFO "m8xx_pcmcia: "args)
diff --git a/drivers/pcmcia/pcmcia_cis.c b/drivers/pcmcia/pcmcia_cis.c
index ac47cc4e20e8..ce8b94a3b675 100644
--- a/drivers/pcmcia/pcmcia_cis.c
+++ b/drivers/pcmcia/pcmcia_cis.c
@@ -22,7 +22,6 @@
22#include <pcmcia/cisreg.h> 22#include <pcmcia/cisreg.h>
23#include <pcmcia/cistpl.h> 23#include <pcmcia/cistpl.h>
24#include <pcmcia/ss.h> 24#include <pcmcia/ss.h>
25#include <pcmcia/cs.h>
26#include <pcmcia/ds.h> 25#include <pcmcia/ds.h>
27#include "cs_internal.h" 26#include "cs_internal.h"
28 27
diff --git a/drivers/pcmcia/pcmcia_resource.c b/drivers/pcmcia/pcmcia_resource.c
index a1fb0dc1a71f..28de5e6e164c 100644
--- a/drivers/pcmcia/pcmcia_resource.c
+++ b/drivers/pcmcia/pcmcia_resource.c
@@ -26,7 +26,6 @@
26#include <asm/irq.h> 26#include <asm/irq.h>
27 27
28#include <pcmcia/ss.h> 28#include <pcmcia/ss.h>
29#include <pcmcia/cs.h>
30#include <pcmcia/cistpl.h> 29#include <pcmcia/cistpl.h>
31#include <pcmcia/cisreg.h> 30#include <pcmcia/cisreg.h>
32#include <pcmcia/ds.h> 31#include <pcmcia/ds.h>
@@ -230,7 +229,7 @@ EXPORT_SYMBOL(pcmcia_map_mem_page);
230 * pcmcia_fixup_iowidth() - reduce io width to 8bit 229 * pcmcia_fixup_iowidth() - reduce io width to 8bit
231 * 230 *
232 * pcmcia_fixup_iowidth() allows a PCMCIA device driver to reduce the 231 * pcmcia_fixup_iowidth() allows a PCMCIA device driver to reduce the
233 * IO width to 8bit after having called pcmcia_request_configuration() 232 * IO width to 8bit after having called pcmcia_enable_device()
234 * previously. 233 * previously.
235 */ 234 */
236int pcmcia_fixup_iowidth(struct pcmcia_device *p_dev) 235int pcmcia_fixup_iowidth(struct pcmcia_device *p_dev)
@@ -278,7 +277,7 @@ EXPORT_SYMBOL(pcmcia_fixup_iowidth);
278 * pcmcia_fixup_vpp() - set Vpp to a new voltage level 277 * pcmcia_fixup_vpp() - set Vpp to a new voltage level
279 * 278 *
280 * pcmcia_fixup_vpp() allows a PCMCIA device driver to set Vpp to 279 * pcmcia_fixup_vpp() allows a PCMCIA device driver to set Vpp to
281 * a new voltage level between calls to pcmcia_request_configuration() 280 * a new voltage level between calls to pcmcia_enable_device()
282 * and pcmcia_disable_device(). 281 * and pcmcia_disable_device().
283 */ 282 */
284int pcmcia_fixup_vpp(struct pcmcia_device *p_dev, unsigned char new_vpp) 283int pcmcia_fixup_vpp(struct pcmcia_device *p_dev, unsigned char new_vpp)
@@ -432,18 +431,21 @@ int pcmcia_release_window(struct pcmcia_device *p_dev, struct resource *res)
432} /* pcmcia_release_window */ 431} /* pcmcia_release_window */
433EXPORT_SYMBOL(pcmcia_release_window); 432EXPORT_SYMBOL(pcmcia_release_window);
434 433
435 434/**
436int pcmcia_request_configuration(struct pcmcia_device *p_dev, 435 * pcmcia_enable_device() - set up and activate a PCMCIA device
437 config_req_t *req) 436 *
437 */
438int pcmcia_enable_device(struct pcmcia_device *p_dev)
438{ 439{
439 int i; 440 int i;
440 u_int base; 441 unsigned int base;
441 struct pcmcia_socket *s = p_dev->socket; 442 struct pcmcia_socket *s = p_dev->socket;
442 config_t *c; 443 config_t *c;
443 pccard_io_map iomap; 444 pccard_io_map iomap;
444 unsigned char status = 0; 445 unsigned char status = 0;
445 unsigned char ext_status = 0; 446 unsigned char ext_status = 0;
446 unsigned char option = 0; 447 unsigned char option = 0;
448 unsigned int flags = p_dev->config_flags;
447 449
448 if (!(s->state & SOCKET_PRESENT)) 450 if (!(s->state & SOCKET_PRESENT))
449 return -ENODEV; 451 return -ENODEV;
@@ -466,23 +468,20 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
466 } 468 }
467 469
468 /* Pick memory or I/O card, DMA mode, interrupt */ 470 /* Pick memory or I/O card, DMA mode, interrupt */
469 c->Attributes = req->Attributes;
470 if (p_dev->_io) 471 if (p_dev->_io)
471 s->socket.flags |= SS_IOCARD; 472 s->socket.flags |= SS_IOCARD;
472 if (req->Attributes & CONF_ENABLE_DMA) 473 if (flags & CONF_ENABLE_SPKR) {
473 s->socket.flags |= SS_DMA_MODE;
474 if (req->Attributes & CONF_ENABLE_SPKR) {
475 s->socket.flags |= SS_SPKR_ENA; 474 s->socket.flags |= SS_SPKR_ENA;
476 status = CCSR_AUDIO_ENA; 475 status = CCSR_AUDIO_ENA;
477 if (!(p_dev->config_regs & PRESENT_STATUS)) 476 if (!(p_dev->config_regs & PRESENT_STATUS))
478 dev_warn(&p_dev->dev, "speaker requested, but " 477 dev_warn(&p_dev->dev, "speaker requested, but "
479 "PRESENT_STATUS not set!\n"); 478 "PRESENT_STATUS not set!\n");
480 } 479 }
481 if (req->Attributes & CONF_ENABLE_IRQ) 480 if (flags & CONF_ENABLE_IRQ)
482 s->socket.io_irq = s->pcmcia_irq; 481 s->socket.io_irq = s->pcmcia_irq;
483 else 482 else
484 s->socket.io_irq = 0; 483 s->socket.io_irq = 0;
485 if (req->Attributes & CONF_ENABLE_ESR) { 484 if (flags & CONF_ENABLE_ESR) {
486 p_dev->config_regs |= PRESENT_EXT_STATUS; 485 p_dev->config_regs |= PRESENT_EXT_STATUS;
487 ext_status = ESR_REQ_ATTN_ENA; 486 ext_status = ESR_REQ_ATTN_ENA;
488 } 487 }
@@ -510,8 +509,8 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
510 if (p_dev->config_regs & PRESENT_IOBASE_0) 509 if (p_dev->config_regs & PRESENT_IOBASE_0)
511 option |= COR_ADDR_DECODE; 510 option |= COR_ADDR_DECODE;
512 } 511 }
513 if ((req->Attributes & CONF_ENABLE_IRQ) && 512 if ((flags & CONF_ENABLE_IRQ) &&
514 !(req->Attributes & CONF_ENABLE_PULSE_IRQ)) 513 !(flags & CONF_ENABLE_PULSE_IRQ))
515 option |= COR_LEVEL_REQ; 514 option |= COR_LEVEL_REQ;
516 pcmcia_write_cis_mem(s, 1, (base + CISREG_COR)>>1, 1, &option); 515 pcmcia_write_cis_mem(s, 1, (base + CISREG_COR)>>1, 1, &option);
517 mdelay(40); 516 mdelay(40);
@@ -560,8 +559,8 @@ int pcmcia_request_configuration(struct pcmcia_device *p_dev,
560 p_dev->_locked = 1; 559 p_dev->_locked = 1;
561 mutex_unlock(&s->ops_mutex); 560 mutex_unlock(&s->ops_mutex);
562 return 0; 561 return 0;
563} /* pcmcia_request_configuration */ 562} /* pcmcia_enable_device */
564EXPORT_SYMBOL(pcmcia_request_configuration); 563EXPORT_SYMBOL(pcmcia_enable_device);
565 564
566 565
567/** 566/**
diff --git a/drivers/pcmcia/pd6729.c b/drivers/pcmcia/pd6729.c
index deef6656ab7b..8cbfa067171f 100644
--- a/drivers/pcmcia/pd6729.c
+++ b/drivers/pcmcia/pd6729.c
@@ -18,7 +18,6 @@
18#include <linux/io.h> 18#include <linux/io.h>
19 19
20#include <pcmcia/ss.h> 20#include <pcmcia/ss.h>
21#include <pcmcia/cs.h>
22 21
23#include <asm/system.h> 22#include <asm/system.h>
24 23
diff --git a/drivers/pcmcia/rsrc_iodyn.c b/drivers/pcmcia/rsrc_iodyn.c
index 8510c35d2952..523eb691c30b 100644
--- a/drivers/pcmcia/rsrc_iodyn.c
+++ b/drivers/pcmcia/rsrc_iodyn.c
@@ -17,7 +17,6 @@
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18 18
19#include <pcmcia/ss.h> 19#include <pcmcia/ss.h>
20#include <pcmcia/cs.h>
21#include <pcmcia/cistpl.h> 20#include <pcmcia/cistpl.h>
22#include "cs_internal.h" 21#include "cs_internal.h"
23 22
diff --git a/drivers/pcmcia/rsrc_mgr.c b/drivers/pcmcia/rsrc_mgr.c
index 4e80421fd908..aa628ed0e9f4 100644
--- a/drivers/pcmcia/rsrc_mgr.c
+++ b/drivers/pcmcia/rsrc_mgr.c
@@ -17,7 +17,6 @@
17#include <linux/kernel.h> 17#include <linux/kernel.h>
18 18
19#include <pcmcia/ss.h> 19#include <pcmcia/ss.h>
20#include <pcmcia/cs.h>
21#include <pcmcia/cistpl.h> 20#include <pcmcia/cistpl.h>
22#include "cs_internal.h" 21#include "cs_internal.h"
23 22
diff --git a/drivers/pcmcia/rsrc_nonstatic.c b/drivers/pcmcia/rsrc_nonstatic.c
index 96f348b35fde..b187555d4388 100644
--- a/drivers/pcmcia/rsrc_nonstatic.c
+++ b/drivers/pcmcia/rsrc_nonstatic.c
@@ -29,7 +29,6 @@
29#include <asm/irq.h> 29#include <asm/irq.h>
30 30
31#include <pcmcia/ss.h> 31#include <pcmcia/ss.h>
32#include <pcmcia/cs.h>
33#include <pcmcia/cistpl.h> 32#include <pcmcia/cistpl.h>
34#include "cs_internal.h" 33#include "cs_internal.h"
35 34
diff --git a/drivers/pcmcia/sa1100_generic.c b/drivers/pcmcia/sa1100_generic.c
index e09851480295..945857f8c284 100644
--- a/drivers/pcmcia/sa1100_generic.c
+++ b/drivers/pcmcia/sa1100_generic.c
@@ -35,7 +35,6 @@
35#include <linux/slab.h> 35#include <linux/slab.h>
36#include <linux/platform_device.h> 36#include <linux/platform_device.h>
37 37
38#include <pcmcia/cs.h>
39#include <pcmcia/ss.h> 38#include <pcmcia/ss.h>
40 39
41#include <asm/hardware/scoop.h> 40#include <asm/hardware/scoop.h>
diff --git a/drivers/pcmcia/soc_common.h b/drivers/pcmcia/soc_common.h
index 3fba3a679128..bbcd5385a221 100644
--- a/drivers/pcmcia/soc_common.h
+++ b/drivers/pcmcia/soc_common.h
@@ -11,7 +11,6 @@
11 11
12/* include the world */ 12/* include the world */
13#include <linux/cpufreq.h> 13#include <linux/cpufreq.h>
14#include <pcmcia/cs.h>
15#include <pcmcia/ss.h> 14#include <pcmcia/ss.h>
16#include <pcmcia/cistpl.h> 15#include <pcmcia/cistpl.h>
17 16
diff --git a/drivers/pcmcia/socket_sysfs.c b/drivers/pcmcia/socket_sysfs.c
index cb0d3ace18bd..71aeed93037c 100644
--- a/drivers/pcmcia/socket_sysfs.c
+++ b/drivers/pcmcia/socket_sysfs.c
@@ -27,7 +27,6 @@
27#include <asm/irq.h> 27#include <asm/irq.h>
28 28
29#include <pcmcia/ss.h> 29#include <pcmcia/ss.h>
30#include <pcmcia/cs.h>
31#include <pcmcia/cistpl.h> 30#include <pcmcia/cistpl.h>
32#include <pcmcia/cisreg.h> 31#include <pcmcia/cisreg.h>
33#include <pcmcia/ds.h> 32#include <pcmcia/ds.h>
diff --git a/drivers/pcmcia/tcic.c b/drivers/pcmcia/tcic.c
index be0d841c7ebd..310160bffe38 100644
--- a/drivers/pcmcia/tcic.c
+++ b/drivers/pcmcia/tcic.c
@@ -49,7 +49,6 @@
49#include <asm/io.h> 49#include <asm/io.h>
50#include <asm/system.h> 50#include <asm/system.h>
51 51
52#include <pcmcia/cs.h>
53#include <pcmcia/ss.h> 52#include <pcmcia/ss.h>
54#include "tcic.h" 53#include "tcic.h"
55 54
diff --git a/drivers/pcmcia/xxs1500_ss.c b/drivers/pcmcia/xxs1500_ss.c
index fa88c360c37a..3b67a1b6a197 100644
--- a/drivers/pcmcia/xxs1500_ss.c
+++ b/drivers/pcmcia/xxs1500_ss.c
@@ -17,7 +17,6 @@
17#include <linux/slab.h> 17#include <linux/slab.h>
18#include <linux/spinlock.h> 18#include <linux/spinlock.h>
19 19
20#include <pcmcia/cs.h>
21#include <pcmcia/ss.h> 20#include <pcmcia/ss.h>
22#include <pcmcia/cistpl.h> 21#include <pcmcia/cistpl.h>
23 22
diff --git a/drivers/pcmcia/yenta_socket.c b/drivers/pcmcia/yenta_socket.c
index 414d9a6f9a32..408dbaa080a1 100644
--- a/drivers/pcmcia/yenta_socket.c
+++ b/drivers/pcmcia/yenta_socket.c
@@ -20,7 +20,6 @@
20#include <linux/slab.h> 20#include <linux/slab.h>
21 21
22#include <pcmcia/ss.h> 22#include <pcmcia/ss.h>
23#include <pcmcia/cs.h>
24 23
25#include "yenta_socket.h" 24#include "yenta_socket.h"
26#include "i82365.h" 25#include "i82365.h"
diff --git a/drivers/scsi/pcmcia/aha152x_stub.c b/drivers/scsi/pcmcia/aha152x_stub.c
index c3682492af16..e1f748517135 100644
--- a/drivers/scsi/pcmcia/aha152x_stub.c
+++ b/drivers/scsi/pcmcia/aha152x_stub.c
@@ -49,7 +49,6 @@
49#include <scsi/scsi_host.h> 49#include <scsi/scsi_host.h>
50#include "aha152x.h" 50#include "aha152x.h"
51 51
52#include <pcmcia/cs.h>
53#include <pcmcia/cistpl.h> 52#include <pcmcia/cistpl.h>
54#include <pcmcia/ds.h> 53#include <pcmcia/ds.h>
55 54
@@ -102,7 +101,7 @@ static int aha152x_probe(struct pcmcia_device *link)
102 101
103 link->resource[0]->end = 0x20; 102 link->resource[0]->end = 0x20;
104 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 103 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
105 link->conf.Attributes = CONF_ENABLE_IRQ; 104 link->config_flags |= CONF_ENABLE_IRQ;
106 link->config_regs = PRESENT_OPTION; 105 link->config_regs = PRESENT_OPTION;
107 106
108 return aha152x_config_cs(link); 107 return aha152x_config_cs(link);
@@ -159,7 +158,7 @@ static int aha152x_config_cs(struct pcmcia_device *link)
159 if (!link->irq) 158 if (!link->irq)
160 goto failed; 159 goto failed;
161 160
162 ret = pcmcia_request_configuration(link, &link->conf); 161 ret = pcmcia_enable_device(link);
163 if (ret) 162 if (ret)
164 goto failed; 163 goto failed;
165 164
diff --git a/drivers/scsi/pcmcia/fdomain_stub.c b/drivers/scsi/pcmcia/fdomain_stub.c
index bb909e1b7c68..ae263b17bfa5 100644
--- a/drivers/scsi/pcmcia/fdomain_stub.c
+++ b/drivers/scsi/pcmcia/fdomain_stub.c
@@ -46,7 +46,6 @@
46#include <scsi/scsi_host.h> 46#include <scsi/scsi_host.h>
47#include "fdomain.h" 47#include "fdomain.h"
48 48
49#include <pcmcia/cs.h>
50#include <pcmcia/cistpl.h> 49#include <pcmcia/cistpl.h>
51#include <pcmcia/ds.h> 50#include <pcmcia/ds.h>
52 51
@@ -85,7 +84,7 @@ static int fdomain_probe(struct pcmcia_device *link)
85 link->priv = info; 84 link->priv = info;
86 link->resource[0]->end = 0x10; 85 link->resource[0]->end = 0x10;
87 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 86 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
88 link->conf.Attributes = CONF_ENABLE_IRQ; 87 link->config_flags |= CONF_ENABLE_IRQ;
89 link->config_regs = PRESENT_OPTION; 88 link->config_regs = PRESENT_OPTION;
90 89
91 return fdomain_config(link); 90 return fdomain_config(link);
@@ -131,7 +130,7 @@ static int fdomain_config(struct pcmcia_device *link)
131 130
132 if (!link->irq) 131 if (!link->irq)
133 goto failed; 132 goto failed;
134 ret = pcmcia_request_configuration(link, &link->conf); 133 ret = pcmcia_enable_device(link);
135 if (ret) 134 if (ret)
136 goto failed; 135 goto failed;
137 136
diff --git a/drivers/scsi/pcmcia/nsp_cs.c b/drivers/scsi/pcmcia/nsp_cs.c
index a5648e9c4f6e..d0546c03f57c 100644
--- a/drivers/scsi/pcmcia/nsp_cs.c
+++ b/drivers/scsi/pcmcia/nsp_cs.c
@@ -47,7 +47,6 @@
47#include <scsi/scsi.h> 47#include <scsi/scsi.h>
48#include <scsi/scsi_ioctl.h> 48#include <scsi/scsi_ioctl.h>
49 49
50#include <pcmcia/cs.h>
51#include <pcmcia/cistpl.h> 50#include <pcmcia/cistpl.h>
52#include <pcmcia/cisreg.h> 51#include <pcmcia/cisreg.h>
53#include <pcmcia/ds.h> 52#include <pcmcia/ds.h>
@@ -1562,7 +1561,7 @@ static int nsp_cs_probe(struct pcmcia_device *link)
1562 link->resource[0]->flags = IO_DATA_PATH_WIDTH_AUTO; 1561 link->resource[0]->flags = IO_DATA_PATH_WIDTH_AUTO;
1563 1562
1564 /* General socket configuration */ 1563 /* General socket configuration */
1565 link->conf.Attributes = CONF_ENABLE_IRQ; 1564 link->config_flags |= CONF_ENABLE_IRQ;
1566 1565
1567 ret = nsp_cs_config(link); 1566 ret = nsp_cs_config(link);
1568 1567
@@ -1608,7 +1607,7 @@ static int nsp_cs_config_check(struct pcmcia_device *p_dev,
1608 1607
1609 /* Does this card need audio output? */ 1608 /* Does this card need audio output? */
1610 if (cfg->flags & CISTPL_CFTABLE_AUDIO) 1609 if (cfg->flags & CISTPL_CFTABLE_AUDIO)
1611 p_dev->conf.Attributes |= CONF_ENABLE_SPKR; 1610 p_dev->config_flags |= CONF_ENABLE_SPKR;
1612 1611
1613 /* Use power settings for Vcc and Vpp if present */ 1612 /* Use power settings for Vcc and Vpp if present */
1614 /* Note that the CIS values need to be rescaled */ 1613 /* Note that the CIS values need to be rescaled */
@@ -1629,7 +1628,7 @@ static int nsp_cs_config_check(struct pcmcia_device *p_dev,
1629 } 1628 }
1630 1629
1631 /* Do we need to allocate an interrupt? */ 1630 /* Do we need to allocate an interrupt? */
1632 p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 1631 p_dev->config_flags |= CONF_ENABLE_IRQ;
1633 1632
1634 /* IO window settings */ 1633 /* IO window settings */
1635 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; 1634 p_dev->resource[0]->end = p_dev->resource[1]->end = 0;
@@ -1700,7 +1699,7 @@ static int nsp_cs_config(struct pcmcia_device *link)
1700 if (pcmcia_request_irq(link, nspintr)) 1699 if (pcmcia_request_irq(link, nspintr))
1701 goto cs_failed; 1700 goto cs_failed;
1702 1701
1703 ret = pcmcia_request_configuration(link, &link->conf); 1702 ret = pcmcia_enable_device(link);
1704 if (ret) 1703 if (ret)
1705 goto cs_failed; 1704 goto cs_failed;
1706 1705
@@ -1749,9 +1748,7 @@ static int nsp_cs_config(struct pcmcia_device *link)
1749 if (link->vpp) { 1748 if (link->vpp) {
1750 printk(", Vpp %d.%d", link->vpp/10, link->vpp%10); 1749 printk(", Vpp %d.%d", link->vpp/10, link->vpp%10);
1751 } 1750 }
1752 if (link->conf.Attributes & CONF_ENABLE_IRQ) { 1751 printk(", irq %d", link->irq);
1753 printk(", irq %d", link->irq);
1754 }
1755 if (link->resource[0]) 1752 if (link->resource[0])
1756 printk(", io %pR", link->resource[0]); 1753 printk(", io %pR", link->resource[0]);
1757 if (link->resource[1]) 1754 if (link->resource[1])
diff --git a/drivers/scsi/pcmcia/qlogic_stub.c b/drivers/scsi/pcmcia/qlogic_stub.c
index 5e2cbe091408..7d3f49c431fd 100644
--- a/drivers/scsi/pcmcia/qlogic_stub.c
+++ b/drivers/scsi/pcmcia/qlogic_stub.c
@@ -48,7 +48,6 @@
48#include <scsi/scsi_host.h> 48#include <scsi/scsi_host.h>
49#include "../qlogicfas408.h" 49#include "../qlogicfas408.h"
50 50
51#include <pcmcia/cs.h>
52#include <pcmcia/cistpl.h> 51#include <pcmcia/cistpl.h>
53#include <pcmcia/ds.h> 52#include <pcmcia/ds.h>
54#include <pcmcia/ciscode.h> 53#include <pcmcia/ciscode.h>
@@ -158,7 +157,7 @@ static int qlogic_probe(struct pcmcia_device *link)
158 link->priv = info; 157 link->priv = info;
159 link->resource[0]->end = 16; 158 link->resource[0]->end = 16;
160 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 159 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
161 link->conf.Attributes = CONF_ENABLE_IRQ; 160 link->config_flags |= CONF_ENABLE_IRQ;
162 link->config_regs = PRESENT_OPTION; 161 link->config_regs = PRESENT_OPTION;
163 162
164 return qlogic_config(link); 163 return qlogic_config(link);
@@ -208,7 +207,7 @@ static int qlogic_config(struct pcmcia_device * link)
208 if (!link->irq) 207 if (!link->irq)
209 goto failed; 208 goto failed;
210 209
211 ret = pcmcia_request_configuration(link, &link->conf); 210 ret = pcmcia_enable_device(link);
212 if (ret) 211 if (ret)
213 goto failed; 212 goto failed;
214 213
@@ -263,7 +262,7 @@ static int qlogic_resume(struct pcmcia_device *link)
263{ 262{
264 scsi_info_t *info = link->priv; 263 scsi_info_t *info = link->priv;
265 264
266 pcmcia_request_configuration(link, &link->conf); 265 pcmcia_enable_device(link);
267 if ((info->manf_id == MANFID_MACNICA) || 266 if ((info->manf_id == MANFID_MACNICA) ||
268 (info->manf_id == MANFID_PIONEER) || 267 (info->manf_id == MANFID_PIONEER) ||
269 (info->manf_id == 0x0098)) { 268 (info->manf_id == 0x0098)) {
diff --git a/drivers/scsi/pcmcia/sym53c500_cs.c b/drivers/scsi/pcmcia/sym53c500_cs.c
index 9aaf974d4d1c..600630eb7034 100644
--- a/drivers/scsi/pcmcia/sym53c500_cs.c
+++ b/drivers/scsi/pcmcia/sym53c500_cs.c
@@ -71,7 +71,6 @@
71#include <scsi/scsi.h> 71#include <scsi/scsi.h>
72#include <scsi/scsi_host.h> 72#include <scsi/scsi_host.h>
73 73
74#include <pcmcia/cs.h>
75#include <pcmcia/cistpl.h> 74#include <pcmcia/cistpl.h>
76#include <pcmcia/ds.h> 75#include <pcmcia/ds.h>
77#include <pcmcia/ciscode.h> 76#include <pcmcia/ciscode.h>
@@ -721,7 +720,7 @@ SYM53C500_config(struct pcmcia_device *link)
721 if (!link->irq) 720 if (!link->irq)
722 goto failed; 721 goto failed;
723 722
724 ret = pcmcia_request_configuration(link, &link->conf); 723 ret = pcmcia_enable_device(link);
725 if (ret) 724 if (ret)
726 goto failed; 725 goto failed;
727 726
@@ -861,7 +860,7 @@ SYM53C500_probe(struct pcmcia_device *link)
861 link->priv = info; 860 link->priv = info;
862 link->resource[0]->end = 16; 861 link->resource[0]->end = 16;
863 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 862 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
864 link->conf.Attributes = CONF_ENABLE_IRQ; 863 link->config_flags |= CONF_ENABLE_IRQ;
865 864
866 return SYM53C500_config(link); 865 return SYM53C500_config(link);
867} /* SYM53C500_attach */ 866} /* SYM53C500_attach */
diff --git a/drivers/serial/serial_cs.c b/drivers/serial/serial_cs.c
index ee19f2d25c20..47b1869026e7 100644
--- a/drivers/serial/serial_cs.c
+++ b/drivers/serial/serial_cs.c
@@ -45,7 +45,6 @@
45#include <asm/io.h> 45#include <asm/io.h>
46#include <asm/system.h> 46#include <asm/system.h>
47 47
48#include <pcmcia/cs.h>
49#include <pcmcia/cistpl.h> 48#include <pcmcia/cistpl.h>
50#include <pcmcia/ciscode.h> 49#include <pcmcia/ciscode.h>
51#include <pcmcia/ds.h> 50#include <pcmcia/ds.h>
@@ -184,7 +183,7 @@ static void quirk_config_socket(struct pcmcia_device *link)
184 struct serial_info *info = link->priv; 183 struct serial_info *info = link->priv;
185 184
186 if (info->multi) 185 if (info->multi)
187 link->conf.Attributes |= CONF_ENABLE_ESR; 186 link->config_flags |= CONF_ENABLE_ESR;
188} 187}
189 188
190static const struct serial_quirk quirks[] = { 189static const struct serial_quirk quirks[] = {
@@ -333,9 +332,9 @@ static int serial_probe(struct pcmcia_device *link)
333 info->p_dev = link; 332 info->p_dev = link;
334 link->priv = info; 333 link->priv = info;
335 334
336 link->conf.Attributes = CONF_ENABLE_IRQ; 335 link->config_flags |= CONF_ENABLE_IRQ;
337 if (do_sound) 336 if (do_sound)
338 link->conf.Attributes |= CONF_ENABLE_SPKR; 337 link->config_flags |= CONF_ENABLE_SPKR;
339 338
340 return serial_config(link); 339 return serial_config(link);
341} 340}
@@ -503,7 +502,7 @@ found_port:
503 if (info->quirk && info->quirk->config) 502 if (info->quirk && info->quirk->config)
504 info->quirk->config(link); 503 info->quirk->config(link);
505 504
506 i = pcmcia_request_configuration(link, &link->conf); 505 i = pcmcia_enable_device(link);
507 if (i != 0) 506 if (i != 0)
508 return -1; 507 return -1;
509 return setup_serial(link, info, link->resource[0]->start, link->irq); 508 return setup_serial(link, info, link->resource[0]->start, link->irq);
@@ -579,7 +578,7 @@ static int multi_config(struct pcmcia_device *link)
579 if (info->quirk && info->quirk->config) 578 if (info->quirk && info->quirk->config)
580 info->quirk->config(link); 579 info->quirk->config(link);
581 580
582 i = pcmcia_request_configuration(link, &link->conf); 581 i = pcmcia_enable_device(link);
583 if (i != 0) 582 if (i != 0)
584 return -ENODEV; 583 return -ENODEV;
585 584
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c
index 7892ac163522..c68b3dc19e11 100644
--- a/drivers/ssb/main.c
+++ b/drivers/ssb/main.c
@@ -20,7 +20,6 @@
20#include <linux/mmc/sdio_func.h> 20#include <linux/mmc/sdio_func.h>
21#include <linux/slab.h> 21#include <linux/slab.h>
22 22
23#include <pcmcia/cs.h>
24#include <pcmcia/cistpl.h> 23#include <pcmcia/cistpl.h>
25#include <pcmcia/ds.h> 24#include <pcmcia/ds.h>
26 25
diff --git a/drivers/ssb/pcmcia.c b/drivers/ssb/pcmcia.c
index 526682d68de8..c7345dbf43fa 100644
--- a/drivers/ssb/pcmcia.c
+++ b/drivers/ssb/pcmcia.c
@@ -13,7 +13,6 @@
13#include <linux/io.h> 13#include <linux/io.h>
14#include <linux/etherdevice.h> 14#include <linux/etherdevice.h>
15 15
16#include <pcmcia/cs.h>
17#include <pcmcia/cistpl.h> 16#include <pcmcia/cistpl.h>
18#include <pcmcia/ciscode.h> 17#include <pcmcia/ciscode.h>
19#include <pcmcia/ds.h> 18#include <pcmcia/ds.h>
diff --git a/drivers/ssb/scan.c b/drivers/ssb/scan.c
index 9738cad4ba13..ee079ab9fb28 100644
--- a/drivers/ssb/scan.c
+++ b/drivers/ssb/scan.c
@@ -17,7 +17,6 @@
17#include <linux/pci.h> 17#include <linux/pci.h>
18#include <linux/io.h> 18#include <linux/io.h>
19 19
20#include <pcmcia/cs.h>
21#include <pcmcia/cistpl.h> 20#include <pcmcia/cistpl.h>
22#include <pcmcia/ds.h> 21#include <pcmcia/ds.h>
23 22
diff --git a/drivers/staging/comedi/drivers/cb_das16_cs.c b/drivers/staging/comedi/drivers/cb_das16_cs.c
index 034cbfcba196..ee91c89511ed 100644
--- a/drivers/staging/comedi/drivers/cb_das16_cs.c
+++ b/drivers/staging/comedi/drivers/cb_das16_cs.c
@@ -37,7 +37,6 @@ Status: experimental
37#include <linux/delay.h> 37#include <linux/delay.h>
38#include <linux/pci.h> 38#include <linux/pci.h>
39 39
40#include <pcmcia/cs.h>
41#include <pcmcia/cistpl.h> 40#include <pcmcia/cistpl.h>
42#include <pcmcia/ds.h> 41#include <pcmcia/ds.h>
43 42
@@ -692,9 +691,6 @@ static int das16cs_pcmcia_attach(struct pcmcia_device *link)
692 local->link = link; 691 local->link = link;
693 link->priv = local; 692 link->priv = local;
694 693
695 /* Initialize the pcmcia_device structure */
696 link->conf.Attributes = 0;
697
698 cur_dev = link; 694 cur_dev = link;
699 695
700 das16cs_pcmcia_config(link); 696 das16cs_pcmcia_config(link);
@@ -723,7 +719,7 @@ static int das16cs_pcmcia_config_loop(struct pcmcia_device *p_dev,
723 return -EINVAL; 719 return -EINVAL;
724 720
725 /* Do we need to allocate an interrupt? */ 721 /* Do we need to allocate an interrupt? */
726 p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 722 p_dev->config_flags |= CONF_ENABLE_IRQ;
727 723
728 /* IO window settings */ 724 /* IO window settings */
729 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; 725 p_dev->resource[0]->end = p_dev->resource[1]->end = 0;
@@ -767,14 +763,13 @@ static void das16cs_pcmcia_config(struct pcmcia_device *link)
767 the I/O windows and the interrupt mapping, and putting the 763 the I/O windows and the interrupt mapping, and putting the
768 card and host interface into "Memory and IO" mode. 764 card and host interface into "Memory and IO" mode.
769 */ 765 */
770 ret = pcmcia_request_configuration(link, &link->conf); 766 ret = pcmcia_enable_device(link);
771 if (ret) 767 if (ret)
772 goto failed; 768 goto failed;
773 769
774 /* Finally, report what we've done */ 770 /* Finally, report what we've done */
775 dev_info(&link->dev, "index 0x%02x", link->config_index); 771 dev_info(&link->dev, "index 0x%02x", link->config_index);
776 if (link->conf.Attributes & CONF_ENABLE_IRQ) 772 printk(", irq %u", link->irq);
777 printk(", irq %u", link->irq);
778 if (link->resource[0]) 773 if (link->resource[0])
779 printk(", io %pR", link->resource[0]); 774 printk(", io %pR", link->resource[0]);
780 if (link->resource[1]) 775 if (link->resource[1])
diff --git a/drivers/staging/comedi/drivers/das08_cs.c b/drivers/staging/comedi/drivers/das08_cs.c
index e37ea79e6aea..f8f3de57b413 100644
--- a/drivers/staging/comedi/drivers/das08_cs.c
+++ b/drivers/staging/comedi/drivers/das08_cs.c
@@ -48,7 +48,6 @@ Command support does not exist, but could be added for this board.
48#include "das08.h" 48#include "das08.h"
49 49
50/* pcmcia includes */ 50/* pcmcia includes */
51#include <pcmcia/cs.h>
52#include <pcmcia/cistpl.h> 51#include <pcmcia/cistpl.h>
53#include <pcmcia/ds.h> 52#include <pcmcia/ds.h>
54 53
@@ -162,15 +161,6 @@ static int das08_pcmcia_attach(struct pcmcia_device *link)
162 local->link = link; 161 local->link = link;
163 link->priv = local; 162 link->priv = local;
164 163
165 /*
166 General socket configuration defaults can go here. In this
167 client, we assume very little, and rely on the CIS for almost
168 everything. In most clients, many details (i.e., number, sizes,
169 and attributes of IO windows) are fixed by the nature of the
170 device, and can be hard-wired here.
171 */
172 link->conf.Attributes = 0;
173
174 cur_dev = link; 164 cur_dev = link;
175 165
176 das08_pcmcia_config(link); 166 das08_pcmcia_config(link);
@@ -211,7 +201,7 @@ static int das08_pcmcia_config_loop(struct pcmcia_device *p_dev,
211 return -ENODEV; 201 return -ENODEV;
212 202
213 /* Do we need to allocate an interrupt? */ 203 /* Do we need to allocate an interrupt? */
214 p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 204 p_dev->config_flags |= CONF_ENABLE_IRQ;
215 205
216 /* IO window settings */ 206 /* IO window settings */
217 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; 207 p_dev->resource[0]->end = p_dev->resource[1]->end = 0;
@@ -263,14 +253,13 @@ static void das08_pcmcia_config(struct pcmcia_device *link)
263 the I/O windows and the interrupt mapping, and putting the 253 the I/O windows and the interrupt mapping, and putting the
264 card and host interface into "Memory and IO" mode. 254 card and host interface into "Memory and IO" mode.
265 */ 255 */
266 ret = pcmcia_request_configuration(link, &link->conf); 256 ret = pcmcia_enable_device(link);
267 if (ret) 257 if (ret)
268 goto failed; 258 goto failed;
269 259
270 /* Finally, report what we've done */ 260 /* Finally, report what we've done */
271 dev_info(&link->dev, "index 0x%02x", link->config_index); 261 dev_info(&link->dev, "index 0x%02x", link->config_index);
272 if (link->conf.Attributes & CONF_ENABLE_IRQ) 262 printk(", irq %u", link->irq);
273 printk(", irq %u", link->irq);
274 if (link->resource[0]) 263 if (link->resource[0])
275 printk(", io %pR", link->resource[0]); 264 printk(", io %pR", link->resource[0]);
276 if (link->resource[1]) 265 if (link->resource[1])
diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c
index 8107e4009248..803683b83543 100644
--- a/drivers/staging/comedi/drivers/ni_daq_700.c
+++ b/drivers/staging/comedi/drivers/ni_daq_700.c
@@ -47,7 +47,6 @@ IRQ is assigned but not used.
47 47
48#include <linux/ioport.h> 48#include <linux/ioport.h>
49 49
50#include <pcmcia/cs.h>
51#include <pcmcia/cistpl.h> 50#include <pcmcia/cistpl.h>
52#include <pcmcia/cisreg.h> 51#include <pcmcia/cisreg.h>
53#include <pcmcia/ds.h> 52#include <pcmcia/ds.h>
@@ -491,15 +490,6 @@ static int dio700_cs_attach(struct pcmcia_device *link)
491 local->link = link; 490 local->link = link;
492 link->priv = local; 491 link->priv = local;
493 492
494 /*
495 General socket configuration defaults can go here. In this
496 client, we assume very little, and rely on the CIS for almost
497 everything. In most clients, many details (i.e., number, sizes,
498 and attributes of IO windows) are fixed by the nature of the
499 device, and can be hard-wired here.
500 */
501 link->conf.Attributes = 0;
502
503 pcmcia_cur_dev = link; 493 pcmcia_cur_dev = link;
504 494
505 dio700_config(link); 495 dio700_config(link);
@@ -550,10 +540,10 @@ static int dio700_pcmcia_config_loop(struct pcmcia_device *p_dev,
550 540
551 /* Does this card need audio output? */ 541 /* Does this card need audio output? */
552 if (cfg->flags & CISTPL_CFTABLE_AUDIO) 542 if (cfg->flags & CISTPL_CFTABLE_AUDIO)
553 p_dev->conf.Attributes |= CONF_ENABLE_SPKR; 543 p_dev->config_flags |= CONF_ENABLE_SPKR;
554 544
555 /* Do we need to allocate an interrupt? */ 545 /* Do we need to allocate an interrupt? */
556 p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 546 p_dev->config_flags |= CONF_ENABLE_IRQ;
557 547
558 /* IO window settings */ 548 /* IO window settings */
559 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; 549 p_dev->resource[0]->end = p_dev->resource[1]->end = 0;
@@ -602,14 +592,13 @@ static void dio700_config(struct pcmcia_device *link)
602 the I/O windows and the interrupt mapping, and putting the 592 the I/O windows and the interrupt mapping, and putting the
603 card and host interface into "Memory and IO" mode. 593 card and host interface into "Memory and IO" mode.
604 */ 594 */
605 ret = pcmcia_request_configuration(link, &link->conf); 595 ret = pcmcia_enable_device(link);
606 if (ret != 0) 596 if (ret != 0)
607 goto failed; 597 goto failed;
608 598
609 /* Finally, report what we've done */ 599 /* Finally, report what we've done */
610 dev_info(&link->dev, "index 0x%02x", link->config_index); 600 dev_info(&link->dev, "index 0x%02x", link->config_index);
611 if (link->conf.Attributes & CONF_ENABLE_IRQ) 601 printk(", irq %d", link->irq);
612 printk(", irq %d", link->irq);
613 if (link->resource[0]) 602 if (link->resource[0])
614 printk(", io %pR", link->resource[0]); 603 printk(", io %pR", link->resource[0]);
615 if (link->resource[1]) 604 if (link->resource[1])
diff --git a/drivers/staging/comedi/drivers/ni_daq_dio24.c b/drivers/staging/comedi/drivers/ni_daq_dio24.c
index 4f9daa3558aa..6512f7a283ce 100644
--- a/drivers/staging/comedi/drivers/ni_daq_dio24.c
+++ b/drivers/staging/comedi/drivers/ni_daq_dio24.c
@@ -48,7 +48,6 @@ the PCMCIA interface.
48 48
49#include "8255.h" 49#include "8255.h"
50 50
51#include <pcmcia/cs.h>
52#include <pcmcia/cistpl.h> 51#include <pcmcia/cistpl.h>
53#include <pcmcia/cisreg.h> 52#include <pcmcia/cisreg.h>
54#include <pcmcia/ds.h> 53#include <pcmcia/ds.h>
@@ -243,15 +242,6 @@ static int dio24_cs_attach(struct pcmcia_device *link)
243 local->link = link; 242 local->link = link;
244 link->priv = local; 243 link->priv = local;
245 244
246 /*
247 General socket configuration defaults can go here. In this
248 client, we assume very little, and rely on the CIS for almost
249 everything. In most clients, many details (i.e., number, sizes,
250 and attributes of IO windows) are fixed by the nature of the
251 device, and can be hard-wired here.
252 */
253 link->conf.Attributes = 0;
254
255 pcmcia_cur_dev = link; 245 pcmcia_cur_dev = link;
256 246
257 dio24_config(link); 247 dio24_config(link);
@@ -302,10 +292,10 @@ static int dio24_pcmcia_config_loop(struct pcmcia_device *p_dev,
302 292
303 /* Does this card need audio output? */ 293 /* Does this card need audio output? */
304 if (cfg->flags & CISTPL_CFTABLE_AUDIO) 294 if (cfg->flags & CISTPL_CFTABLE_AUDIO)
305 p_dev->conf.Attributes |= CONF_ENABLE_SPKR; 295 p_dev->config_flags |= CONF_ENABLE_SPKR;
306 296
307 /* Do we need to allocate an interrupt? */ 297 /* Do we need to allocate an interrupt? */
308 p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 298 p_dev->config_flags |= CONF_ENABLE_IRQ;
309 299
310 /* IO window settings */ 300 /* IO window settings */
311 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; 301 p_dev->resource[0]->end = p_dev->resource[1]->end = 0;
@@ -353,14 +343,13 @@ static void dio24_config(struct pcmcia_device *link)
353 the I/O windows and the interrupt mapping, and putting the 343 the I/O windows and the interrupt mapping, and putting the
354 card and host interface into "Memory and IO" mode. 344 card and host interface into "Memory and IO" mode.
355 */ 345 */
356 ret = pcmcia_request_configuration(link, &link->conf); 346 ret = pcmcia_enable_device(link);
357 if (ret) 347 if (ret)
358 goto failed; 348 goto failed;
359 349
360 /* Finally, report what we've done */ 350 /* Finally, report what we've done */
361 dev_info(&link->dev, "index 0x%02x", link->config_index); 351 dev_info(&link->dev, "index 0x%02x", link->config_index);
362 if (link->conf.Attributes & CONF_ENABLE_IRQ) 352 printk(", irq %d", link->irq);
363 printk(", irq %d", link->irq);
364 if (link->resource[0]) 353 if (link->resource[0])
365 printk(" & %pR", link->resource[0]); 354 printk(" & %pR", link->resource[0]);
366 if (link->resource[1]) 355 if (link->resource[1])
diff --git a/drivers/staging/comedi/drivers/ni_labpc_cs.c b/drivers/staging/comedi/drivers/ni_labpc_cs.c
index 2e27a3048cb8..255cf40c5fd1 100644
--- a/drivers/staging/comedi/drivers/ni_labpc_cs.c
+++ b/drivers/staging/comedi/drivers/ni_labpc_cs.c
@@ -71,7 +71,6 @@ NI manuals:
71#include "comedi_fc.h" 71#include "comedi_fc.h"
72#include "ni_labpc.h" 72#include "ni_labpc.h"
73 73
74#include <pcmcia/cs.h>
75#include <pcmcia/cistpl.h> 74#include <pcmcia/cistpl.h>
76#include <pcmcia/cisreg.h> 75#include <pcmcia/cisreg.h>
77#include <pcmcia/ds.h> 76#include <pcmcia/ds.h>
@@ -219,15 +218,6 @@ static int labpc_cs_attach(struct pcmcia_device *link)
219 local->link = link; 218 local->link = link;
220 link->priv = local; 219 link->priv = local;
221 220
222 /*
223 General socket configuration defaults can go here. In this
224 client, we assume very little, and rely on the CIS for almost
225 everything. In most clients, many details (i.e., number, sizes,
226 and attributes of IO windows) are fixed by the nature of the
227 device, and can be hard-wired here.
228 */
229 link->conf.Attributes = 0;
230
231 pcmcia_cur_dev = link; 221 pcmcia_cur_dev = link;
232 222
233 labpc_config(link); 223 labpc_config(link);
@@ -281,10 +271,10 @@ static int labpc_pcmcia_config_loop(struct pcmcia_device *p_dev,
281 271
282 /* Does this card need audio output? */ 272 /* Does this card need audio output? */
283 if (cfg->flags & CISTPL_CFTABLE_AUDIO) 273 if (cfg->flags & CISTPL_CFTABLE_AUDIO)
284 p_dev->conf.Attributes |= CONF_ENABLE_SPKR; 274 p_dev->config_flags |= CONF_ENABLE_SPKR;
285 275
286 /* Do we need to allocate an interrupt? */ 276 /* Do we need to allocate an interrupt? */
287 p_dev->conf.Attributes |= CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ; 277 p_dev->config_flags |= CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ;
288 278
289 /* IO window settings */ 279 /* IO window settings */
290 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; 280 p_dev->resource[0]->end = p_dev->resource[1]->end = 0;
@@ -331,14 +321,14 @@ static void labpc_config(struct pcmcia_device *link)
331 the I/O windows and the interrupt mapping, and putting the 321 the I/O windows and the interrupt mapping, and putting the
332 card and host interface into "Memory and IO" mode. 322 card and host interface into "Memory and IO" mode.
333 */ 323 */
334 ret = pcmcia_request_configuration(link, &link->conf); 324 p_dev->config_flags |= CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ;
325 ret = pcmcia_enable_device(link);
335 if (ret) 326 if (ret)
336 goto failed; 327 goto failed;
337 328
338 /* Finally, report what we've done */ 329 /* Finally, report what we've done */
339 dev_info(&link->dev, "index 0x%02x", link->config_index); 330 dev_info(&link->dev, "index 0x%02x", link->config_index);
340 if (link->conf.Attributes & CONF_ENABLE_IRQ) 331 printk(", irq %d", link->irq);
341 printk(", irq %d", link->irq);
342 if (link->resource[0]) 332 if (link->resource[0])
343 printk(" & %pR", link->resource[0]); 333 printk(" & %pR", link->resource[0]);
344 if (link->resource[1]) 334 if (link->resource[1])
diff --git a/drivers/staging/comedi/drivers/ni_mio_cs.c b/drivers/staging/comedi/drivers/ni_mio_cs.c
index be7e021e576d..b88f52dd08d0 100644
--- a/drivers/staging/comedi/drivers/ni_mio_cs.c
+++ b/drivers/staging/comedi/drivers/ni_mio_cs.c
@@ -48,7 +48,6 @@ See the notes in the ni_atmio.o driver.
48#include "ni_stc.h" 48#include "ni_stc.h"
49#include "8255.h" 49#include "8255.h"
50 50
51#include <pcmcia/cs.h>
52#include <pcmcia/cistpl.h> 51#include <pcmcia/cistpl.h>
53#include <pcmcia/ds.h> 52#include <pcmcia/ds.h>
54 53
@@ -265,7 +264,7 @@ static int cs_attach(struct pcmcia_device *link)
265{ 264{
266 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16; 265 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_16;
267 link->resource[0]->end = 16; 266 link->resource[0]->end = 16;
268 link->conf.Attributes = CONF_ENABLE_IRQ; 267 link->config_flags |= CONF_ENABLE_IRQ;
269 268
270 cur_dev = link; 269 cur_dev = link;
271 270
@@ -336,7 +335,7 @@ static void mio_cs_config(struct pcmcia_device *link)
336 if (!link->irq) 335 if (!link->irq)
337 dev_info(&link->dev, "no IRQ available\n"); 336 dev_info(&link->dev, "no IRQ available\n");
338 337
339 ret = pcmcia_request_configuration(link, &link->conf); 338 ret = pcmcia_enable_device(link);
340} 339}
341 340
342static int mio_cs_attach(struct comedi_device *dev, struct comedi_devconfig *it) 341static int mio_cs_attach(struct comedi_device *dev, struct comedi_devconfig *it)
diff --git a/drivers/staging/comedi/drivers/quatech_daqp_cs.c b/drivers/staging/comedi/drivers/quatech_daqp_cs.c
index a2a32de044c8..b8940d7f4155 100644
--- a/drivers/staging/comedi/drivers/quatech_daqp_cs.c
+++ b/drivers/staging/comedi/drivers/quatech_daqp_cs.c
@@ -50,7 +50,6 @@ Devices: [Quatech] DAQP-208 (daqp), DAQP-308
50#include "../comedidev.h" 50#include "../comedidev.h"
51#include <linux/semaphore.h> 51#include <linux/semaphore.h>
52 52
53#include <pcmcia/cs.h>
54#include <pcmcia/cistpl.h> 53#include <pcmcia/cistpl.h>
55#include <pcmcia/cisreg.h> 54#include <pcmcia/cisreg.h>
56#include <pcmcia/ds.h> 55#include <pcmcia/ds.h>
@@ -1031,15 +1030,6 @@ static int daqp_cs_attach(struct pcmcia_device *link)
1031 local->link = link; 1030 local->link = link;
1032 link->priv = local; 1031 link->priv = local;
1033 1032
1034 /*
1035 General socket configuration defaults can go here. In this
1036 client, we assume very little, and rely on the CIS for almost
1037 everything. In most clients, many details (i.e., number, sizes,
1038 and attributes of IO windows) are fixed by the nature of the
1039 device, and can be hard-wired here.
1040 */
1041 link->conf.Attributes = 0;
1042
1043 daqp_cs_config(link); 1033 daqp_cs_config(link);
1044 1034
1045 return 0; 1035 return 0;
@@ -1088,7 +1078,7 @@ static int daqp_pcmcia_config_loop(struct pcmcia_device *p_dev,
1088 return -ENODEV; 1078 return -ENODEV;
1089 1079
1090 /* Do we need to allocate an interrupt? */ 1080 /* Do we need to allocate an interrupt? */
1091 p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 1081 p_dev->config_flags |= CONF_ENABLE_IRQ;
1092 1082
1093 /* IO window settings */ 1083 /* IO window settings */
1094 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; 1084 p_dev->resource[0]->end = p_dev->resource[1]->end = 0;
@@ -1132,14 +1122,13 @@ static void daqp_cs_config(struct pcmcia_device *link)
1132 the I/O windows and the interrupt mapping, and putting the 1122 the I/O windows and the interrupt mapping, and putting the
1133 card and host interface into "Memory and IO" mode. 1123 card and host interface into "Memory and IO" mode.
1134 */ 1124 */
1135 ret = pcmcia_request_configuration(link, &link->conf); 1125 ret = pcmcia_enable_device(link);
1136 if (ret) 1126 if (ret)
1137 goto failed; 1127 goto failed;
1138 1128
1139 /* Finally, report what we've done */ 1129 /* Finally, report what we've done */
1140 dev_info(&link->dev, "index 0x%02x", link->config_index); 1130 dev_info(&link->dev, "index 0x%02x", link->config_index);
1141 if (link->conf.Attributes & CONF_ENABLE_IRQ) 1131 printk(", irq %u", link->irq);
1142 printk(", irq %u", link->irq);
1143 if (link->resource[0]) 1132 if (link->resource[0])
1144 printk(" & %pR", link->resource[0]); 1133 printk(" & %pR", link->resource[0]);
1145 if (link->resource[1]) 1134 if (link->resource[1])
diff --git a/drivers/staging/wlags49_h2/wl_cs.c b/drivers/staging/wlags49_h2/wl_cs.c
index 778800f1e464..62a70afa3e29 100644
--- a/drivers/staging/wlags49_h2/wl_cs.c
+++ b/drivers/staging/wlags49_h2/wl_cs.c
@@ -83,7 +83,6 @@
83#include <linux/if_arp.h> 83#include <linux/if_arp.h>
84#include <linux/ioport.h> 84#include <linux/ioport.h>
85 85
86#include <pcmcia/cs.h>
87#include <pcmcia/cistpl.h> 86#include <pcmcia/cistpl.h>
88#include <pcmcia/cisreg.h> 87#include <pcmcia/cisreg.h>
89#include <pcmcia/ciscode.h> 88#include <pcmcia/ciscode.h>
@@ -147,7 +146,7 @@ static int wl_adapter_attach(struct pcmcia_device *link)
147 146
148 link->resource[0]->end = HCF_NUM_IO_PORTS; 147 link->resource[0]->end = HCF_NUM_IO_PORTS;
149 link->resource[0]->flags= IO_DATA_PATH_WIDTH_16; 148 link->resource[0]->flags= IO_DATA_PATH_WIDTH_16;
150 link->conf.Attributes = CONF_ENABLE_IRQ; 149 link->config_flags |= CONF_ENABLE_IRQ;
151 link->config_index = 5; 150 link->config_index = 5;
152 link->config_regs = PRESENT_OPTION; 151 link->config_regs = PRESENT_OPTION;
153 152
@@ -301,7 +300,7 @@ void wl_adapter_insert(struct pcmcia_device *link)
301 dev = link->priv; 300 dev = link->priv;
302 301
303 /* Do we need to allocate an interrupt? */ 302 /* Do we need to allocate an interrupt? */
304 link->conf.Attributes |= CONF_ENABLE_IRQ; 303 link->config_flags |= CONF_ENABLE_IRQ;
305 link->io_lines = 6; 304 link->io_lines = 6;
306 305
307 ret = pcmcia_request_io(link); 306 ret = pcmcia_request_io(link);
@@ -312,7 +311,7 @@ void wl_adapter_insert(struct pcmcia_device *link)
312 if (ret != 0) 311 if (ret != 0)
313 goto failed; 312 goto failed;
314 313
315 ret = pcmcia_request_configuration(link, &link->conf); 314 ret = pcmcia_enable_device(link);
316 if (ret != 0) 315 if (ret != 0)
317 goto failed; 316 goto failed;
318 317
diff --git a/drivers/staging/wlags49_h2/wl_internal.h b/drivers/staging/wlags49_h2/wl_internal.h
index 02f0a20e178a..cd129b3ee6c0 100644
--- a/drivers/staging/wlags49_h2/wl_internal.h
+++ b/drivers/staging/wlags49_h2/wl_internal.h
@@ -69,7 +69,6 @@
69 ******************************************************************************/ 69 ******************************************************************************/
70#include <linux/version.h> 70#include <linux/version.h>
71#ifdef BUS_PCMCIA 71#ifdef BUS_PCMCIA
72#include <pcmcia/cs.h>
73#include <pcmcia/cistpl.h> 72#include <pcmcia/cistpl.h>
74#include <pcmcia/cisreg.h> 73#include <pcmcia/cisreg.h>
75#include <pcmcia/ciscode.h> 74#include <pcmcia/ciscode.h>
diff --git a/drivers/telephony/ixj_pcmcia.c b/drivers/telephony/ixj_pcmcia.c
index 5ccc6d0560a9..e23270d1b4d1 100644
--- a/drivers/telephony/ixj_pcmcia.c
+++ b/drivers/telephony/ixj_pcmcia.c
@@ -8,7 +8,6 @@
8#include <linux/errno.h> /* error codes */ 8#include <linux/errno.h> /* error codes */
9#include <linux/slab.h> 9#include <linux/slab.h>
10 10
11#include <pcmcia/cs.h>
12#include <pcmcia/cistpl.h> 11#include <pcmcia/cistpl.h>
13#include <pcmcia/ds.h> 12#include <pcmcia/ds.h>
14 13
@@ -143,7 +142,7 @@ static int ixj_config(struct pcmcia_device * link)
143 if (pcmcia_loop_config(link, ixj_config_check, &dflt)) 142 if (pcmcia_loop_config(link, ixj_config_check, &dflt))
144 goto failed; 143 goto failed;
145 144
146 if (pcmcia_request_configuration(link, &link->conf)) 145 if (pcmcia_enable_device(link))
147 goto failed; 146 goto failed;
148 147
149 /* 148 /*
diff --git a/drivers/usb/host/sl811_cs.c b/drivers/usb/host/sl811_cs.c
index 590405361bed..744c2cd809f1 100644
--- a/drivers/usb/host/sl811_cs.c
+++ b/drivers/usb/host/sl811_cs.c
@@ -20,7 +20,6 @@
20#include <linux/ioport.h> 20#include <linux/ioport.h>
21#include <linux/platform_device.h> 21#include <linux/platform_device.h>
22 22
23#include <pcmcia/cs.h>
24#include <pcmcia/cistpl.h> 23#include <pcmcia/cistpl.h>
25#include <pcmcia/cisreg.h> 24#include <pcmcia/cisreg.h>
26#include <pcmcia/ds.h> 25#include <pcmcia/ds.h>
@@ -159,7 +158,7 @@ static int sl811_cs_config_check(struct pcmcia_device *p_dev,
159 dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; 158 dflt->vpp1.param[CISTPL_POWER_VNOM]/10000;
160 159
161 /* we need an interrupt */ 160 /* we need an interrupt */
162 p_dev->conf.Attributes |= CONF_ENABLE_IRQ; 161 p_dev->config_flags |= CONF_ENABLE_IRQ;
163 162
164 /* IO window settings */ 163 /* IO window settings */
165 p_dev->resource[0]->end = p_dev->resource[1]->end = 0; 164 p_dev->resource[0]->end = p_dev->resource[1]->end = 0;
@@ -195,7 +194,7 @@ static int sl811_cs_config(struct pcmcia_device *link)
195 if (!link->irq) 194 if (!link->irq)
196 goto failed; 195 goto failed;
197 196
198 ret = pcmcia_request_configuration(link, &link->conf); 197 ret = pcmcia_enable_device(link);
199 if (ret) 198 if (ret)
200 goto failed; 199 goto failed;
201 200
@@ -227,8 +226,6 @@ static int sl811_cs_probe(struct pcmcia_device *link)
227 local->p_dev = link; 226 local->p_dev = link;
228 link->priv = local; 227 link->priv = local;
229 228
230 link->conf.Attributes = 0;
231
232 return sl811_cs_config(link); 229 return sl811_cs_config(link);
233} 230}
234 231
diff --git a/include/pcmcia/cs.h b/include/pcmcia/cs.h
deleted file mode 100644
index 47b6092c4ed6..000000000000
--- a/include/pcmcia/cs.h
+++ /dev/null
@@ -1,35 +0,0 @@
1/*
2 * cs.h
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
7 *
8 * The initial developer of the original code is David A. Hinds
9 * <dahinds@users.sourceforge.net>. Portions created by David A. Hinds
10 * are Copyright (C) 1999 David A. Hinds. All Rights Reserved.
11 *
12 * (C) 1999 David A. Hinds
13 */
14
15#ifndef _LINUX_CS_H
16#define _LINUX_CS_H
17
18#ifdef __KERNEL__
19#include <linux/interrupt.h>
20#endif
21
22/* For RequestConfiguration */
23typedef struct config_req_t {
24 u_int Attributes;
25} config_req_t;
26
27/* Attributes for RequestConfiguration */
28#define CONF_ENABLE_IRQ 0x01
29#define CONF_ENABLE_DMA 0x02
30#define CONF_ENABLE_SPKR 0x04
31#define CONF_ENABLE_PULSE_IRQ 0x08
32#define CONF_ENABLE_ESR 0x10
33#define CONF_VALID_CLIENT 0x100
34
35#endif /* _LINUX_CS_H */
diff --git a/include/pcmcia/ds.h b/include/pcmcia/ds.h
index bc28f96d0b5a..50b03fd67fd6 100644
--- a/include/pcmcia/ds.h
+++ b/include/pcmcia/ds.h
@@ -24,9 +24,11 @@
24 24
25#ifdef __KERNEL__ 25#ifdef __KERNEL__
26#include <linux/device.h> 26#include <linux/device.h>
27#include <linux/interrupt.h>
27#include <pcmcia/ss.h> 28#include <pcmcia/ss.h>
28#include <asm/atomic.h> 29#include <asm/atomic.h>
29 30
31
30/* 32/*
31 * PCMCIA device drivers (16-bit cards only; 32-bit cards require CardBus 33 * PCMCIA device drivers (16-bit cards only; 32-bit cards require CardBus
32 * a.k.a. PCI drivers 34 * a.k.a. PCI drivers
@@ -88,18 +90,16 @@ struct pcmcia_device {
88 90
89 struct list_head socket_device_list; 91 struct list_head socket_device_list;
90 92
91 /* deprecated, will be cleaned up soon */
92 config_req_t conf;
93
94 /* device setup */ 93 /* device setup */
95 unsigned int irq; 94 unsigned int irq;
96 struct resource *resource[PCMCIA_NUM_RESOURCES]; 95 struct resource *resource[PCMCIA_NUM_RESOURCES];
97 unsigned int vpp; 96 unsigned int vpp;
98 97
99 unsigned int io_lines; /* number of I/O lines */ 98 unsigned int config_flags; /* CONF_ENABLE_ flags below */
100 unsigned int config_base; 99 unsigned int config_base;
101 unsigned int config_index; 100 unsigned int config_index;
102 unsigned int config_regs; /* PRESENT_ flags below */ 101 unsigned int config_regs; /* PRESENT_ flags below */
102 unsigned int io_lines; /* number of I/O lines */
103 103
104 /* Is the device suspended? */ 104 /* Is the device suspended? */
105 u16 suspended:1; 105 u16 suspended:1;
@@ -207,8 +207,7 @@ pcmcia_request_exclusive_irq(struct pcmcia_device *p_dev,
207int __must_check pcmcia_request_irq(struct pcmcia_device *p_dev, 207int __must_check pcmcia_request_irq(struct pcmcia_device *p_dev,
208 irq_handler_t handler); 208 irq_handler_t handler);
209 209
210int pcmcia_request_configuration(struct pcmcia_device *p_dev, 210int pcmcia_enable_device(struct pcmcia_device *p_dev);
211 config_req_t *req);
212 211
213int pcmcia_request_window(struct pcmcia_device *p_dev, struct resource *res, 212int pcmcia_request_window(struct pcmcia_device *p_dev, struct resource *res,
214 unsigned int speed); 213 unsigned int speed);
@@ -265,6 +264,12 @@ static inline int pcmcia_io_cfg_data_width(unsigned int flags)
265#define PRESENT_IOBASE_3 0x100 264#define PRESENT_IOBASE_3 0x100
266#define PRESENT_IOSIZE 0x200 265#define PRESENT_IOSIZE 0x200
267 266
267/* flags to be passed to pcmcia_enable_device() */
268#define CONF_ENABLE_IRQ 0x01
269#define CONF_ENABLE_SPKR 0x02
270#define CONF_ENABLE_PULSE_IRQ 0x04
271#define CONF_ENABLE_ESR 0x08
272
268#endif /* __KERNEL__ */ 273#endif /* __KERNEL__ */
269 274
270#endif /* _LINUX_DS_H */ 275#endif /* _LINUX_DS_H */
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h
index 626b63c33d9e..731cde010f42 100644
--- a/include/pcmcia/ss.h
+++ b/include/pcmcia/ss.h
@@ -19,7 +19,6 @@
19#include <linux/sched.h> /* task_struct, completion */ 19#include <linux/sched.h> /* task_struct, completion */
20#include <linux/mutex.h> 20#include <linux/mutex.h>
21 21
22#include <pcmcia/cs.h>
23#ifdef CONFIG_CARDBUS 22#ifdef CONFIG_CARDBUS
24#include <linux/pci.h> 23#include <linux/pci.h>
25#endif 24#endif
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.c b/sound/pcmcia/pdaudiocf/pdaudiocf.c
index 4df07fce637f..2476d5f0a14f 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf.c
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf.c
@@ -142,7 +142,7 @@ static int snd_pdacf_probe(struct pcmcia_device *link)
142 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 142 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
143 link->resource[0]->end = 16; 143 link->resource[0]->end = 16;
144 144
145 link->conf.Attributes = CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ; 145 link->config_flags = CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ;
146 link->config_index = 1; 146 link->config_index = 1;
147 link->config_regs = PRESENT_OPTION; 147 link->config_regs = PRESENT_OPTION;
148 148
@@ -217,6 +217,7 @@ static int pdacf_config(struct pcmcia_device *link)
217 217
218 snd_printdd(KERN_DEBUG "pdacf_config called\n"); 218 snd_printdd(KERN_DEBUG "pdacf_config called\n");
219 link->config_index = 0x5; 219 link->config_index = 0x5;
220 link->config_flags |= CONF_ENABLE_IRQ | CONF_ENABLE_PULSE_IRQ;
220 221
221 ret = pcmcia_request_io(link); 222 ret = pcmcia_request_io(link);
222 if (ret) 223 if (ret)
@@ -226,7 +227,7 @@ static int pdacf_config(struct pcmcia_device *link)
226 if (ret) 227 if (ret)
227 goto failed; 228 goto failed;
228 229
229 ret = pcmcia_request_configuration(link, &link->conf); 230 ret = pcmcia_enable_device(link);
230 if (ret) 231 if (ret)
231 goto failed; 232 goto failed;
232 233
diff --git a/sound/pcmcia/pdaudiocf/pdaudiocf.h b/sound/pcmcia/pdaudiocf/pdaudiocf.h
index 5cc3e4573074..bd26e092aead 100644
--- a/sound/pcmcia/pdaudiocf/pdaudiocf.h
+++ b/sound/pcmcia/pdaudiocf/pdaudiocf.h
@@ -24,7 +24,6 @@
24#include <sound/pcm.h> 24#include <sound/pcm.h>
25#include <asm/io.h> 25#include <asm/io.h>
26#include <linux/interrupt.h> 26#include <linux/interrupt.h>
27#include <pcmcia/cs.h>
28#include <pcmcia/cistpl.h> 27#include <pcmcia/cistpl.h>
29#include <pcmcia/ds.h> 28#include <pcmcia/ds.h>
30 29
diff --git a/sound/pcmcia/vx/vxpocket.c b/sound/pcmcia/vx/vxpocket.c
index 16186adc1bdc..017a8d6c510d 100644
--- a/sound/pcmcia/vx/vxpocket.c
+++ b/sound/pcmcia/vx/vxpocket.c
@@ -2,7 +2,7 @@
2 * Driver for Digigram VXpocket V2/440 soundcards 2 * Driver for Digigram VXpocket V2/440 soundcards
3 * 3 *
4 * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de> 4 * Copyright (c) 2002 by Takashi Iwai <tiwai@suse.de>
5 * 5
6 * This program is free software; you can redistribute it and/or modify 6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by 7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or 8 * the Free Software Foundation; either version 2 of the License, or
@@ -162,7 +162,7 @@ static int snd_vxpocket_new(struct snd_card *card, int ibl,
162 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO; 162 link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
163 link->resource[0]->end = 16; 163 link->resource[0]->end = 16;
164 164
165 link->conf.Attributes = CONF_ENABLE_IRQ; 165 link->config_flags |= CONF_ENABLE_IRQ;
166 link->config_index = 1; 166 link->config_index = 1;
167 link->config_regs = PRESENT_OPTION; 167 link->config_regs = PRESENT_OPTION;
168 168
@@ -233,7 +233,7 @@ static int vxpocket_config(struct pcmcia_device *link)
233 if (ret) 233 if (ret)
234 goto failed; 234 goto failed;
235 235
236 ret = pcmcia_request_configuration(link, &link->conf); 236 ret = pcmcia_enable_device(link);
237 if (ret) 237 if (ret)
238 goto failed; 238 goto failed;
239 239
diff --git a/sound/pcmcia/vx/vxpocket.h b/sound/pcmcia/vx/vxpocket.h
index d9110669d042..13d658c1a216 100644
--- a/sound/pcmcia/vx/vxpocket.h
+++ b/sound/pcmcia/vx/vxpocket.h
@@ -23,7 +23,6 @@
23 23
24#include <sound/vx_core.h> 24#include <sound/vx_core.h>
25 25
26#include <pcmcia/cs.h>
27#include <pcmcia/cistpl.h> 26#include <pcmcia/cistpl.h>
28#include <pcmcia/ds.h> 27#include <pcmcia/ds.h>
29 28