diff options
author | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-07-24 06:23:21 -0400 |
---|---|---|
committer | Dominik Brodowski <linux@dominikbrodowski.net> | 2010-08-03 03:02:35 -0400 |
commit | 1d5cc192d431bce2ebe9fde64054ce903200e179 (patch) | |
tree | cdcdfb77712349bf46f0876d420e2be81f901d74 /drivers/ssb/pcmcia.c | |
parent | ac8b422838046ffc26be4874a3cbae0d313f4209 (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/pcmcia.c')
-rw-r--r-- | drivers/ssb/pcmcia.c | 14 |
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. */ |
72 | static int ssb_pcmcia_cfg_write(struct ssb_bus *bus, u8 offset, u8 value) | 72 | static 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(®, 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, ®); | ||
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. */ |
89 | static int ssb_pcmcia_cfg_read(struct ssb_bus *bus, u8 offset, u8 *value) | 84 | static 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(®, 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, ®); | ||
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 | } |