summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl1251/io.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/wireless/wl1251/io.h')
-rw-r--r--drivers/net/wireless/wl1251/io.h9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/net/wireless/wl1251/io.h b/drivers/net/wireless/wl1251/io.h
index c545e9d5f512..d382877c34cc 100644
--- a/drivers/net/wireless/wl1251/io.h
+++ b/drivers/net/wireless/wl1251/io.h
@@ -36,16 +36,15 @@
static inline u32 wl1251_read32(struct wl1251 *wl, int addr)
{
- u32 response;
-
- wl->if_ops->read(wl, addr, &response, sizeof(u32));
+ wl->if_ops->read(wl, addr, &wl->buffer_32, sizeof(wl->buffer_32));
- return response;
+ return le32_to_cpu(wl->buffer_32);
}
static inline void wl1251_write32(struct wl1251 *wl, int addr, u32 val)
{
- wl->if_ops->write(wl, addr, &val, sizeof(u32));
+ wl->buffer_32 = cpu_to_le32(val);
+ wl->if_ops->write(wl, addr, &wl->buffer_32, sizeof(wl->buffer_32));
}
static inline u32 wl1251_read_elp(struct wl1251 *wl, int addr)
OpenPOWER on IntegriCloud