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/net/wireless/airo_cs.c | 16 +++------------- drivers/net/wireless/atmel_cs.c | 16 +++------------- drivers/net/wireless/b43/pcmcia.c | 5 ++--- drivers/net/wireless/hostap/hostap_cs.c | 10 ++++------ drivers/net/wireless/libertas/if_cs.c | 10 +++------- drivers/net/wireless/orinoco/orinoco_cs.c | 12 ++---------- drivers/net/wireless/orinoco/spectrum_cs.c | 12 ++---------- drivers/net/wireless/ray_cs.c | 5 ++--- drivers/net/wireless/wl3501_cs.c | 5 ++--- 9 files changed, 23 insertions(+), 68 deletions(-) (limited to 'drivers/net/wireless') 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 @@ #include #include -#include #include #include #include @@ -96,15 +95,6 @@ static int airo_probe(struct pcmcia_device *p_dev) dev_dbg(&p_dev->dev, "airo_attach()\n"); - /* - General socket configuration defaults can go here. In this - client, we assume very little, and rely on the CIS for almost - everything. In most clients, many details (i.e., number, sizes, - and attributes of IO windows) are fixed by the nature of the - device, and can be hard-wired here. - */ - p_dev->conf.Attributes = 0; - /* Allocate space for private device-specific data */ local = kzalloc(sizeof(local_info_t), GFP_KERNEL); if (!local) { @@ -158,7 +148,7 @@ static int airo_cs_config_check(struct pcmcia_device *p_dev, /* Does this card need audio output? */ if (cfg->flags & CISTPL_CFTABLE_AUDIO) - p_dev->conf.Attributes |= CONF_ENABLE_SPKR; + p_dev->config_flags |= CONF_ENABLE_SPKR; /* Use power settings for Vcc and Vpp if present */ /* Note that the CIS values need to be rescaled */ @@ -167,7 +157,7 @@ static int airo_cs_config_check(struct pcmcia_device *p_dev, else if (dflt->vpp1.present & (1<vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; + p_dev->config_flags |= CONF_ENABLE_IRQ; /* IO window settings */ p_dev->resource[0]->end = p_dev->resource[1]->end = 0; @@ -229,7 +219,7 @@ static int airo_config(struct pcmcia_device *link) the I/O windows and the interrupt mapping, and putting the card and host interface into "Memory and IO" mode. */ - ret = pcmcia_request_configuration(link, &link->conf); + ret = pcmcia_enable_device(link); if (ret) goto failed; ((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 @@ #include #include -#include #include #include #include @@ -106,15 +105,6 @@ static int atmel_probe(struct pcmcia_device *p_dev) dev_dbg(&p_dev->dev, "atmel_attach()\n"); - /* - General socket configuration defaults can go here. In this - client, we assume very little, and rely on the CIS for almost - everything. In most clients, many details (i.e., number, sizes, - and attributes of IO windows) are fixed by the nature of the - device, and can be hard-wired here. - */ - p_dev->conf.Attributes = 0; - /* Allocate space for private device-specific data */ local = kzalloc(sizeof(local_info_t), GFP_KERNEL); if (!local) { @@ -175,7 +165,7 @@ static int atmel_config_check(struct pcmcia_device *p_dev, /* Does this card need audio output? */ if (cfg->flags & CISTPL_CFTABLE_AUDIO) - p_dev->conf.Attributes |= CONF_ENABLE_SPKR; + p_dev->config_flags |= CONF_ENABLE_SPKR; /* Use power settings for Vcc and Vpp if present */ /* Note that the CIS values need to be rescaled */ @@ -184,7 +174,7 @@ static int atmel_config_check(struct pcmcia_device *p_dev, else if (dflt->vpp1.present & (1<vpp = dflt->vpp1.param[CISTPL_POWER_VNOM]/10000; - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; + p_dev->config_flags |= CONF_ENABLE_IRQ; /* IO window settings */ p_dev->resource[0]->end = p_dev->resource[1]->end = 0; @@ -242,7 +232,7 @@ static int atmel_config(struct pcmcia_device *link) the I/O windows and the interrupt mapping, and putting the card and host interface into "Memory and IO" mode. */ - ret = pcmcia_request_configuration(link, &link->conf); + ret = pcmcia_enable_device(link); if (ret) goto failed; 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 @@ #include #include -#include #include #include #include @@ -72,7 +71,7 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) err = -ENODEV; - dev->conf.Attributes = CONF_ENABLE_IRQ; + dev->config_flags |= CONF_ENABLE_IRQ; dev->resource[2]->flags |= WIN_ENABLE | WIN_DATA_WIDTH_16 | WIN_USE_WAIT; @@ -89,7 +88,7 @@ static int __devinit b43_pcmcia_probe(struct pcmcia_device *dev) if (!dev->irq) goto err_disable; - res = pcmcia_request_configuration(dev, &dev->conf); + res = pcmcia_enable_device(dev); if (res != 0) goto err_disable; 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 @@ #include #include -#include #include #include #include @@ -484,7 +483,7 @@ static int prism2_config_check(struct pcmcia_device *p_dev, /* Does this card need audio output? */ if (cfg->flags & CISTPL_CFTABLE_AUDIO) - p_dev->conf.Attributes |= CONF_ENABLE_SPKR; + p_dev->config_flags |= CONF_ENABLE_SPKR; /* Use power settings for Vcc and Vpp if present */ /* Note that the CIS values need to be rescaled */ @@ -510,7 +509,7 @@ static int prism2_config_check(struct pcmcia_device *p_dev, p_dev->vpp = dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000; /* Do we need to allocate an interrupt? */ - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; + p_dev->config_flags |= CONF_ENABLE_IRQ; /* IO window settings */ PDEBUG(DEBUG_EXTRA, "IO window settings: cfg->io.nwin=%d " @@ -590,7 +589,7 @@ static int prism2_config(struct pcmcia_device *link) * the I/O windows and the interrupt mapping, and putting the * card and host interface into "Memory and IO" mode. */ - ret = pcmcia_request_configuration(link, &link->conf); + ret = pcmcia_enable_device(link); if (ret) goto failed_unlock; @@ -605,8 +604,7 @@ static int prism2_config(struct pcmcia_device *link) if (link->vpp) printk(", Vpp %d.%d", link->vpp / 10, link->vpp % 10); - if (link->conf.Attributes & CONF_ENABLE_IRQ) - printk(", irq %d", link->irq); + printk(", irq %d", link->irq); if (link->resource[0]) printk(" & %pR", link->resource[0]); 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 @@ #include #include -#include #include #include @@ -806,7 +805,7 @@ static int if_cs_ioprobe(struct pcmcia_device *p_dev, p_dev->resource[0]->end = cfg->io.win[0].len; /* Do we need to allocate an interrupt? */ - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; + p_dev->config_flags |= CONF_ENABLE_IRQ; /* IO window settings */ if (cfg->io.nwin != 1) { @@ -835,14 +834,11 @@ static int if_cs_probe(struct pcmcia_device *p_dev) card->p_dev = p_dev; p_dev->priv = card; - p_dev->conf.Attributes = 0; - if (pcmcia_loop_config(p_dev, if_cs_ioprobe, NULL)) { lbs_pr_err("error in pcmcia_loop_config\n"); goto out1; } - /* * Allocate an interrupt line. Note that this does not assign * a handler to the interrupt, unless the 'Handler' member of @@ -865,9 +861,9 @@ static int if_cs_probe(struct pcmcia_device *p_dev) * the I/O windows and the interrupt mapping, and putting the * card and host interface into "Memory and IO" mode. */ - ret = pcmcia_request_configuration(p_dev, &p_dev->conf); + ret = pcmcia_enable_device(p_dev); if (ret) { - lbs_pr_err("error in pcmcia_request_configuration\n"); + lbs_pr_err("error in pcmcia_enable_device\n"); goto out2; } 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 @@ #include #include #include -#include #include #include #include @@ -117,13 +116,6 @@ orinoco_cs_probe(struct pcmcia_device *link) card->p_dev = link; link->priv = priv; - /* General socket configuration defaults can go here. In this - * client, we assume very little, and rely on the CIS for - * almost everything. In most clients, many details (i.e., - * number, sizes, and attributes of IO windows) are fixed by - * the nature of the device, and can be hard-wired here. */ - link->conf.Attributes = 0; - return orinoco_cs_config(link); } /* orinoco_cs_attach */ @@ -187,7 +179,7 @@ static int orinoco_cs_config_check(struct pcmcia_device *p_dev, dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000; /* Do we need to allocate an interrupt? */ - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; + p_dev->config_flags |= CONF_ENABLE_IRQ; /* IO window settings */ p_dev->resource[0]->end = p_dev->resource[1]->end = 0; @@ -266,7 +258,7 @@ orinoco_cs_config(struct pcmcia_device *link) * the I/O windows and the interrupt mapping, and putting the * card and host interface into "Memory and IO" mode. */ - ret = pcmcia_request_configuration(link, &link->conf); + ret = pcmcia_enable_device(link); if (ret) goto failed; 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 @@ #include #include #include -#include #include #include #include @@ -179,13 +178,6 @@ spectrum_cs_probe(struct pcmcia_device *link) card->p_dev = link; link->priv = priv; - /* General socket configuration defaults can go here. In this - * client, we assume very little, and rely on the CIS for - * almost everything. In most clients, many details (i.e., - * number, sizes, and attributes of IO windows) are fixed by - * the nature of the device, and can be hard-wired here. */ - link->conf.Attributes = 0; - return spectrum_cs_config(link); } /* spectrum_cs_attach */ @@ -249,7 +241,7 @@ static int spectrum_cs_config_check(struct pcmcia_device *p_dev, dflt->vpp1.param[CISTPL_POWER_VNOM] / 10000; /* Do we need to allocate an interrupt? */ - p_dev->conf.Attributes |= CONF_ENABLE_IRQ; + p_dev->config_flags |= CONF_ENABLE_IRQ; /* IO window settings */ p_dev->resource[0]->end = p_dev->resource[1]->end = 0; @@ -329,7 +321,7 @@ spectrum_cs_config(struct pcmcia_device *link) * the I/O windows and the interrupt mapping, and putting the * card and host interface into "Memory and IO" mode. */ - ret = pcmcia_request_configuration(link, &link->conf); + ret = pcmcia_enable_device(link); if (ret) goto failed; 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 @@ #include #include -#include #include #include #include @@ -318,7 +317,7 @@ static int ray_probe(struct pcmcia_device *p_dev) p_dev->resource[0]->flags |= IO_DATA_PATH_WIDTH_8; /* General socket configuration */ - p_dev->conf.Attributes = CONF_ENABLE_IRQ; + p_dev->config_flags |= CONF_ENABLE_IRQ; p_dev->config_index = 1; p_dev->priv = dev; @@ -413,7 +412,7 @@ static int ray_config(struct pcmcia_device *link) /* This actually configures the PCMCIA socket -- setting up the I/O windows and the interrupt mapping. */ - ret = pcmcia_request_configuration(link, &link->conf); + ret = pcmcia_enable_device(link); if (ret) goto failed; 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 @@ #include -#include #include #include #include @@ -1888,7 +1887,7 @@ static int wl3501_probe(struct pcmcia_device *p_dev) p_dev->resource[0]->flags = IO_DATA_PATH_WIDTH_8; /* General socket configuration */ - p_dev->conf.Attributes = CONF_ENABLE_IRQ; + p_dev->config_flags = CONF_ENABLE_IRQ; p_dev->config_index = 1; dev = alloc_etherdev(sizeof(struct wl3501_card)); @@ -1954,7 +1953,7 @@ static int wl3501_config(struct pcmcia_device *link) /* This actually configures the PCMCIA socket -- setting up the I/O * windows and the interrupt mapping. */ - ret = pcmcia_request_configuration(link, &link->conf); + ret = pcmcia_enable_device(link); if (ret) goto failed; -- cgit v1.2.3