From 1ac71e5a35eebee60cdcf15b3980bd94498f037b Mon Sep 17 00:00:00 2001 From: Dominik Brodowski Date: Thu, 29 Jul 2010 19:27:09 +0200 Subject: 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 CC: linux-scsi@vger.kernel.org Acked-by: Gustavo F. Padovan (for drivers/bluetooth) Tested-by: Wolfram Sang Signed-off-by: Dominik Brodowski --- drivers/char/pcmcia/cm4000_cs.c | 3 +-- drivers/char/pcmcia/cm4040_cs.c | 5 ++--- drivers/char/pcmcia/ipwireless/main.c | 6 ++---- drivers/char/pcmcia/ipwireless/main.h | 1 - drivers/char/pcmcia/ipwireless/tty.h | 1 - drivers/char/pcmcia/synclink_cs.c | 10 +++------- 6 files changed, 8 insertions(+), 18 deletions(-) (limited to 'drivers/char/pcmcia') diff --git a/drivers/char/pcmcia/cm4000_cs.c b/drivers/char/pcmcia/cm4000_cs.c index d2accd64b3f..75caa8c1b48 100644 --- a/drivers/char/pcmcia/cm4000_cs.c +++ b/drivers/char/pcmcia/cm4000_cs.c @@ -34,7 +34,6 @@ #include #include -#include #include #include #include @@ -1767,7 +1766,7 @@ static int cm4000_config(struct pcmcia_device * link, int devno) if (pcmcia_loop_config(link, cm4000_config_check, NULL)) goto cs_release; - if (pcmcia_request_configuration(link, &link->conf)) + if (pcmcia_enable_device(link)) goto cs_release; dev = link->priv; diff --git a/drivers/char/pcmcia/cm4040_cs.c b/drivers/char/pcmcia/cm4040_cs.c index a32eba0afdf..0c87b80bf64 100644 --- a/drivers/char/pcmcia/cm4040_cs.c +++ b/drivers/char/pcmcia/cm4040_cs.c @@ -29,7 +29,6 @@ #include #include -#include #include #include #include @@ -547,10 +546,10 @@ static int reader_config(struct pcmcia_device *link, int devno) if (pcmcia_loop_config(link, cm4040_config_check, NULL)) goto cs_release; - fail_rc = pcmcia_request_configuration(link, &link->conf); + fail_rc = pcmcia_enable_device(link); if (fail_rc != 0) { dev_printk(KERN_INFO, &link->dev, - "pcmcia_request_configuration failed 0x%x\n", + "pcmcia_enable_device failed 0x%x\n", fail_rc); goto cs_release; } diff --git a/drivers/char/pcmcia/ipwireless/main.c b/drivers/char/pcmcia/ipwireless/main.c index 05c4e6834a6..cd21b2bcdcd 100644 --- a/drivers/char/pcmcia/ipwireless/main.c +++ b/drivers/char/pcmcia/ipwireless/main.c @@ -32,7 +32,6 @@ #include #include #include -#include static struct pcmcia_device_id ipw_ids[] = { PCMCIA_DEVICE_MANF_CARD(0x02f2, 0x0100), @@ -172,7 +171,7 @@ static int config_ipwireless(struct ipw_dev *ipw) if (ret != 0) return ret; - link->conf.Attributes = CONF_ENABLE_IRQ; + link->config_flags |= CONF_ENABLE_IRQ; INIT_WORK(&ipw->work_reboot, signalled_reboot_work); @@ -210,8 +209,7 @@ static int config_ipwireless(struct ipw_dev *ipw) * Do the RequestConfiguration last, because it enables interrupts. * Then we don't get any interrupts before we're ready for them. */ - ret = pcmcia_request_configuration(link, &link->conf); - + ret = pcmcia_enable_device(link); if (ret != 0) goto exit; diff --git a/drivers/char/pcmcia/ipwireless/main.h b/drivers/char/pcmcia/ipwireless/main.h index 90402195855..f2cbb116bcc 100644 --- a/drivers/char/pcmcia/ipwireless/main.h +++ b/drivers/char/pcmcia/ipwireless/main.h @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/drivers/char/pcmcia/ipwireless/tty.h b/drivers/char/pcmcia/ipwireless/tty.h index 3e163d4cab1..747b2d63786 100644 --- a/drivers/char/pcmcia/ipwireless/tty.h +++ b/drivers/char/pcmcia/ipwireless/tty.h @@ -21,7 +21,6 @@ #include #include -#include #include #include diff --git a/drivers/char/pcmcia/synclink_cs.c b/drivers/char/pcmcia/synclink_cs.c index 535aa0899e9..99feaedc53a 100644 --- a/drivers/char/pcmcia/synclink_cs.c +++ b/drivers/char/pcmcia/synclink_cs.c @@ -70,7 +70,6 @@ #include #include -#include #include #include #include @@ -550,8 +549,6 @@ static int mgslpc_probe(struct pcmcia_device *link) /* Initialize the struct pcmcia_device structure */ - link->conf.Attributes = 0; - ret = mgslpc_config(link); if (ret) return ret; @@ -593,14 +590,14 @@ static int mgslpc_config(struct pcmcia_device *link) if (ret != 0) goto failed; - link->conf.Attributes = CONF_ENABLE_IRQ; + link->config_flags |= CONF_ENABLE_IRQ; link->config_index = 8; link->config_regs = PRESENT_OPTION; ret = pcmcia_request_irq(link, mgslpc_isr); if (ret) goto failed; - ret = pcmcia_request_configuration(link, &link->conf); + ret = pcmcia_enable_device(link); if (ret) goto failed; @@ -609,8 +606,7 @@ static int mgslpc_config(struct pcmcia_device *link) dev_info(&link->dev, "index 0x%02x:", link->config_index); - if (link->conf.Attributes & CONF_ENABLE_IRQ) - printk(", irq %d", link->irq); + printk(", irq %d", link->irq); if (link->resource[0]) printk(", io %pR", link->resource[0]); printk("\n"); -- cgit v1.2.3-70-g09d2