mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: [email protected] CC: Jiri Kosina <[email protected]> CC: [email protected] Acked-by: Gustavo F. Padovan <[email protected]> (for drivers/bluetooth) Tested-by: Wolfram Sang <[email protected]> Signed-off-by: Dominik Brodowski <[email protected]>
This commit is contained in:
parent
7feabb6412
commit
1ac71e5a35
90 changed files with 179 additions and 395 deletions
|
|
@ -20,7 +20,6 @@
|
|||
#include <asm/io.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
#include <pcmcia/cs.h>
|
||||
#include <pcmcia/cistpl.h>
|
||||
#include <pcmcia/ciscode.h>
|
||||
#include <pcmcia/ds.h>
|
||||
|
|
@ -79,7 +78,7 @@ static int avmcs_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->config_regs = PRESENT_OPTION;
|
||||
|
||||
|
|
@ -149,7 +148,7 @@ static int avmcs_config(struct pcmcia_device *link)
|
|||
/*
|
||||
* configure the PCMCIA socket
|
||||
*/
|
||||
i = pcmcia_request_configuration(link, &link->conf);
|
||||
i = pcmcia_enable_device(link);
|
||||
if (i != 0) {
|
||||
pcmcia_disable_device(link);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -20,7 +20,6 @@
|
|||
#include <asm/io.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
#include <pcmcia/cs.h>
|
||||
#include <pcmcia/cistpl.h>
|
||||
#include <pcmcia/ds.h>
|
||||
#include "hisax_cfg.h"
|
||||
|
|
@ -84,7 +83,7 @@ static int __devinit avma1cs_probe(struct pcmcia_device *p_dev)
|
|||
p_dev->resource[1]->flags |= IO_DATA_PATH_WIDTH_16;
|
||||
|
||||
/* General socket configuration */
|
||||
p_dev->conf.Attributes = CONF_ENABLE_IRQ;
|
||||
p_dev->config_flags |= CONF_ENABLE_IRQ;
|
||||
p_dev->config_index = 1;
|
||||
p_dev->config_regs = PRESENT_OPTION;
|
||||
|
||||
|
|
@ -160,7 +159,7 @@ static int __devinit avma1cs_config(struct pcmcia_device *link)
|
|||
/*
|
||||
* configure the PCMCIA socket
|
||||
*/
|
||||
i = pcmcia_request_configuration(link, &link->conf);
|
||||
i = pcmcia_enable_device(link);
|
||||
if (i != 0) {
|
||||
pcmcia_disable_device(link);
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@
|
|||
#include <asm/io.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
#include <pcmcia/cs.h>
|
||||
#include <pcmcia/cistpl.h>
|
||||
#include <pcmcia/cisreg.h>
|
||||
#include <pcmcia/ds.h>
|
||||
|
|
@ -129,8 +128,6 @@ static int __devinit elsa_cs_probe(struct pcmcia_device *link)
|
|||
link->resource[0]->end = 8;
|
||||
link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
|
||||
|
||||
link->conf.Attributes = CONF_ENABLE_IRQ;
|
||||
|
||||
return elsa_cs_config(link);
|
||||
} /* elsa_cs_attach */
|
||||
|
||||
|
|
@ -205,15 +202,14 @@ static int __devinit elsa_cs_config(struct pcmcia_device *link)
|
|||
if (!link->irq)
|
||||
goto failed;
|
||||
|
||||
i = pcmcia_request_configuration(link, &link->conf);
|
||||
i = pcmcia_enable_device(link);
|
||||
if (i != 0)
|
||||
goto failed;
|
||||
|
||||
/* Finally, report what we've done */
|
||||
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(" & %pR", link->resource[0]);
|
||||
if (link->resource[1])
|
||||
|
|
|
|||
|
|
@ -46,7 +46,6 @@
|
|||
#include <asm/io.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
#include <pcmcia/cs.h>
|
||||
#include <pcmcia/cistpl.h>
|
||||
#include <pcmcia/cisreg.h>
|
||||
#include <pcmcia/ds.h>
|
||||
|
|
@ -132,8 +131,6 @@ static int __devinit sedlbauer_probe(struct pcmcia_device *link)
|
|||
link->resource[0]->end = 8;
|
||||
link->resource[0]->flags |= IO_DATA_PATH_WIDTH_8;
|
||||
|
||||
link->conf.Attributes = 0;
|
||||
|
||||
return sedlbauer_config(link);
|
||||
} /* sedlbauer_attach */
|
||||
|
||||
|
|
@ -175,7 +172,7 @@ static int sedlbauer_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 */
|
||||
|
|
@ -192,7 +189,7 @@ static int sedlbauer_config_check(struct pcmcia_device *p_dev,
|
|||
else if (dflt->vpp1.present & (1<<CISTPL_POWER_VNOM))
|
||||
p_dev->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;
|
||||
|
|
@ -247,7 +244,7 @@ static int __devinit sedlbauer_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;
|
||||
|
||||
|
|
@ -256,8 +253,7 @@ static int __devinit sedlbauer_config(struct pcmcia_device *link)
|
|||
link->config_index);
|
||||
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])
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@
|
|||
#include <asm/io.h>
|
||||
#include <asm/system.h>
|
||||
|
||||
#include <pcmcia/cs.h>
|
||||
#include <pcmcia/cistpl.h>
|
||||
#include <pcmcia/cisreg.h>
|
||||
#include <pcmcia/ds.h>
|
||||
|
|
@ -109,7 +108,7 @@ static int __devinit teles_probe(struct pcmcia_device *link)
|
|||
link->resource[0]->end = 96;
|
||||
link->resource[0]->flags |= IO_DATA_PATH_WIDTH_AUTO;
|
||||
|
||||
link->conf.Attributes = CONF_ENABLE_IRQ;
|
||||
link->config_flags |= CONF_ENABLE_IRQ;
|
||||
|
||||
return teles_cs_config(link);
|
||||
} /* teles_attach */
|
||||
|
|
@ -185,15 +184,14 @@ static int __devinit teles_cs_config(struct pcmcia_device *link)
|
|||
if (!link->irq)
|
||||
goto cs_failed;
|
||||
|
||||
i = pcmcia_request_configuration(link, &link->conf);
|
||||
i = pcmcia_enable_device(link);
|
||||
if (i != 0)
|
||||
goto cs_failed;
|
||||
|
||||
/* Finally, report what we've done */
|
||||
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(" & %pR", link->resource[0]);
|
||||
if (link->resource[1])
|
||||
|
|
|
|||
Loading…
Reference in a new issue