summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-07-29 18:19:39 +0400
committerDominik Brodowski <linux@dominikbrodowski.net>2010-09-29 19:20:22 +0400
commitfc301101034c06bf56a7f71bf682c48909e401a4 (patch)
treef1faa456d436515d73679bb12587967efba05e7c /drivers/net
parent1a4a046030ade0f57b8f3b476d61c7c35d894b66 (diff)
downloadlinux-fc301101034c06bf56a7f71bf682c48909e401a4.tar.xz
pcmcia: simplify Status, ExtStatus register access
The Status (CISREG_CCSR) and ExtStatus (CISREG_ESR) registers were only accessed to enable audio output for some drivers and IRQ for serial_cs.c. The former also required setting config_req_t.Attributes to CONF_ENABLE_SPKR; the latter can be simplified to setting this field to CONF_ENABLE_ESR. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-serial@vger.kernel.org CC: linux-scsi@vger.kernel.org Tested-by: Wolfram Sang <w.sang@pengutronix.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/net')
-rw-r--r--drivers/net/pcmcia/axnet_cs.c4
-rw-r--r--drivers/net/pcmcia/pcnet_cs.c5
-rw-r--r--drivers/net/pcmcia/smc91c92_cs.c2
-rw-r--r--drivers/net/pcmcia/xirc2ps_cs.c5
-rw-r--r--drivers/net/wireless/airo_cs.c4
-rw-r--r--drivers/net/wireless/atmel_cs.c4
-rw-r--r--drivers/net/wireless/hostap/hostap_cs.c4
7 files changed, 8 insertions, 20 deletions
diff --git a/drivers/net/pcmcia/axnet_cs.c b/drivers/net/pcmcia/axnet_cs.c
index 5f05ffb240cc..8734ed8f174d 100644
--- a/drivers/net/pcmcia/axnet_cs.c
+++ b/drivers/net/pcmcia/axnet_cs.c
@@ -334,10 +334,8 @@ static int axnet_config(struct pcmcia_device *link)
if (!link->irq)
goto failed;
- if (resource_size(link->resource[1]) == 8) {
+ if (resource_size(link->resource[1]) == 8)
link->conf.Attributes |= CONF_ENABLE_SPKR;
- link->conf.Status = CCSR_AUDIO_ENA;
- }
ret = pcmcia_request_configuration(link, &link->conf);
if (ret)
diff --git a/drivers/net/pcmcia/pcnet_cs.c b/drivers/net/pcmcia/pcnet_cs.c
index aa6ee6b264cd..f3d7a149070a 100644
--- a/drivers/net/pcmcia/pcnet_cs.c
+++ b/drivers/net/pcmcia/pcnet_cs.c
@@ -560,10 +560,9 @@ static hw_info_t *pcnet_try_config(struct pcmcia_device *link,
if (!link->irq)
return NULL;
- if (resource_size(link->resource[1]) == 8) {
+ if (resource_size(link->resource[1]) == 8)
link->conf.Attributes |= CONF_ENABLE_SPKR;
- link->conf.Status = CCSR_AUDIO_ENA;
- }
+
if ((link->manf_id == MANFID_IBM) &&
(link->card_id == PRODID_IBM_HOME_AND_AWAY))
link->conf.ConfigIndex |= 0x10;
diff --git a/drivers/net/pcmcia/smc91c92_cs.c b/drivers/net/pcmcia/smc91c92_cs.c
index 395e586d7c0a..2031a27253d1 100644
--- a/drivers/net/pcmcia/smc91c92_cs.c
+++ b/drivers/net/pcmcia/smc91c92_cs.c
@@ -446,7 +446,6 @@ static int mhz_mfc_config(struct pcmcia_device *link)
int i;
link->conf.Attributes |= CONF_ENABLE_SPKR;
- link->conf.Status = CCSR_AUDIO_ENA;
link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
link->resource[1]->end = 8;
@@ -640,7 +639,6 @@ static int osi_config(struct pcmcia_device *link)
int i, j;
link->conf.Attributes |= CONF_ENABLE_SPKR;
- link->conf.Status = CCSR_AUDIO_ENA;
link->resource[0]->end = 64;
link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
link->resource[1]->end = 8;
diff --git a/drivers/net/pcmcia/xirc2ps_cs.c b/drivers/net/pcmcia/xirc2ps_cs.c
index 4308bda0e96d..59398a6f1344 100644
--- a/drivers/net/pcmcia/xirc2ps_cs.c
+++ b/drivers/net/pcmcia/xirc2ps_cs.c
@@ -812,10 +812,9 @@ xirc2ps_config(struct pcmcia_device * link)
if (local->modem) {
int pass;
- if (do_sound) {
+ if (do_sound)
link->conf.Attributes |= CONF_ENABLE_SPKR;
- link->conf.Status |= CCSR_AUDIO_ENA;
- }
+
link->resource[1]->end = 8;
link->resource[1]->flags |= IO_DATA_PATH_WIDTH_8;
if (local->dingo) {
diff --git a/drivers/net/wireless/airo_cs.c b/drivers/net/wireless/airo_cs.c
index 488e7b45d54b..ab60f1084716 100644
--- a/drivers/net/wireless/airo_cs.c
+++ b/drivers/net/wireless/airo_cs.c
@@ -158,10 +158,8 @@ static int airo_cs_config_check(struct pcmcia_device *p_dev,
return -ENODEV;
/* Does this card need audio output? */
- if (cfg->flags & CISTPL_CFTABLE_AUDIO) {
+ if (cfg->flags & CISTPL_CFTABLE_AUDIO)
p_dev->conf.Attributes |= CONF_ENABLE_SPKR;
- p_dev->conf.Status = CCSR_AUDIO_ENA;
- }
/* Use power settings for Vcc and Vpp if present */
/* Note that the CIS values need to be rescaled */
diff --git a/drivers/net/wireless/atmel_cs.c b/drivers/net/wireless/atmel_cs.c
index 479f5084bac1..d6d585cb992a 100644
--- a/drivers/net/wireless/atmel_cs.c
+++ b/drivers/net/wireless/atmel_cs.c
@@ -175,10 +175,8 @@ static int atmel_config_check(struct pcmcia_device *p_dev,
return -ENODEV;
/* Does this card need audio output? */
- if (cfg->flags & CISTPL_CFTABLE_AUDIO) {
+ if (cfg->flags & CISTPL_CFTABLE_AUDIO)
p_dev->conf.Attributes |= CONF_ENABLE_SPKR;
- p_dev->conf.Status = CCSR_AUDIO_ENA;
- }
/* Use power settings for Vcc and Vpp if present */
/* Note that the CIS values need to be rescaled */
diff --git a/drivers/net/wireless/hostap/hostap_cs.c b/drivers/net/wireless/hostap/hostap_cs.c
index 3f35dd4438ca..3fa285b1bdd3 100644
--- a/drivers/net/wireless/hostap/hostap_cs.c
+++ b/drivers/net/wireless/hostap/hostap_cs.c
@@ -484,10 +484,8 @@ static int prism2_config_check(struct pcmcia_device *p_dev,
"(default 0x%02X)\n", cfg->index, dflt->index);
/* Does this card need audio output? */
- if (cfg->flags & CISTPL_CFTABLE_AUDIO) {
+ if (cfg->flags & CISTPL_CFTABLE_AUDIO)
p_dev->conf.Attributes |= CONF_ENABLE_SPKR;
- p_dev->conf.Status = CCSR_AUDIO_ENA;
- }
/* Use power settings for Vcc and Vpp if present */
/* Note that the CIS values need to be rescaled */