aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/char/pcmcia
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-07-29 13:27:09 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2010-09-29 11:20:23 -0400
commit1ac71e5a35eebee60cdcf15b3980bd94498f037b (patch)
tree22fa9342ccccce6a774af029ce51a526e55f8180 /drivers/char/pcmcia
parent7feabb6412ea23edd298c0fa90e5aa6733eb4a42 (diff)
pcmcia: convert pcmcia_request_configuration to pcmcia_enable_device
pcmcia_enable_device() now replaces pcmcia_request_configuration(). Instead of config_req_t, all necessary flags are either passed as a parameter to pcmcia_enable_device(), or (in rare circumstances) set in struct pcmcia_device -> flags. With the last remaining user of include/pcmcia/cs.h gone, remove all references. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-ide@vger.kernel.org CC: linux-usb@vger.kernel.org CC: laforge@gnumonks.org CC: linux-mtd@lists.infradead.org CC: alsa-devel@alsa-project.org CC: linux-serial@vger.kernel.org CC: Jiri Kosina <jkosina@suse.cz> CC: linux-scsi@vger.kernel.org Acked-by: Gustavo F. Padovan <padovan@profusion.mobi> (for drivers/bluetooth) Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/char/pcmcia')
-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
6 files changed, 8 insertions, 18 deletions
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");