aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ssb
diff options
context:
space:
mode:
authorDominik Brodowski <linux@dominikbrodowski.net>2010-07-24 06:23:21 -0400
committerDominik Brodowski <linux@dominikbrodowski.net>2010-08-03 03:02:35 -0400
commit1d5cc192d431bce2ebe9fde64054ce903200e179 (patch)
treecdcdfb77712349bf46f0876d420e2be81f901d74 /drivers/ssb
parentac8b422838046ffc26be4874a3cbae0d313f4209 (diff)
pcmcia: use pcmica_{read,write}_config_byte
Use pcmcia_read_config_byte and pcmcia_write_config_byte instead of pcmcia_access_configuration_register. CC: netdev@vger.kernel.org CC: linux-wireless@vger.kernel.org CC: linux-serial@vger.kernel.org CC: Michael Buesch <mb@bu3sch.de> Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net>
Diffstat (limited to 'drivers/ssb')
-rw-r--r--drivers/ssb/pcmcia.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/drivers/ssb/pcmcia.c b/drivers/ssb/pcmcia.c
index 21520308178b..526682d68de8 100644
--- a/drivers/ssb/pcmcia.c
+++ b/drivers/ssb/pcmcia.c
@@ -71,14 +71,9 @@
71/* Write to a PCMCIA configuration register. */ 71/* Write to a PCMCIA configuration register. */
72static int ssb_pcmcia_cfg_write(struct ssb_bus *bus, u8 offset, u8 value) 72static int ssb_pcmcia_cfg_write(struct ssb_bus *bus, u8 offset, u8 value)
73{ 73{
74 conf_reg_t reg;
75 int res; 74 int res;
76 75
77 memset(&reg, 0, sizeof(reg)); 76 res = pcmcia_write_config_byte(bus->host_pcmcia, offset, value);
78 reg.Offset = offset;
79 reg.Action = CS_WRITE;
80 reg.Value = value;
81 res = pcmcia_access_configuration_register(bus->host_pcmcia, &reg);
82 if (unlikely(res != 0)) 77 if (unlikely(res != 0))
83 return -EBUSY; 78 return -EBUSY;
84 79
@@ -88,16 +83,11 @@ static int ssb_pcmcia_cfg_write(struct ssb_bus *bus, u8 offset, u8 value)
88/* Read from a PCMCIA configuration register. */ 83/* Read from a PCMCIA configuration register. */
89static int ssb_pcmcia_cfg_read(struct ssb_bus *bus, u8 offset, u8 *value) 84static int ssb_pcmcia_cfg_read(struct ssb_bus *bus, u8 offset, u8 *value)
90{ 85{
91 conf_reg_t reg;
92 int res; 86 int res;
93 87
94 memset(&reg, 0, sizeof(reg)); 88 res = pcmcia_read_config_byte(bus->host_pcmcia, offset, value);
95 reg.Offset = offset;
96 reg.Action = CS_READ;
97 res = pcmcia_access_configuration_register(bus->host_pcmcia, &reg);
98 if (unlikely(res != 0)) 89 if (unlikely(res != 0))
99 return -EBUSY; 90 return -EBUSY;
100 *value = reg.Value;
101 91
102 return 0; 92 return 0;
103} 93}