aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ssb
diff options
context:
space:
mode:
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}