aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorIdo Yariv <ido@wizery.com>2012-06-17 14:29:51 -0400
committerLuciano Coelho <coelho@ti.com>2012-06-22 03:46:34 -0400
commit0c2a6ce04eb4d742170a4ddfeb57263fb7964698 (patch)
tree7dc681ff1bdf82902ab809560f57dda23f24ebf2 /drivers
parent02eb1d9d3bc307e2b540b8c095fa19342789f86d (diff)
wlcore: Change raw io functions to return errors
Make wl1271_raw_write and wl1271_raw_read return errors so the driver could handle these appropriately. Since the prototype has changed, also rename the prefix of these functions to wlcore. Signed-off-by: Ido Yariv <ido@wizery.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/wireless/ti/wlcore/io.h26
1 files changed, 13 insertions, 13 deletions
diff --git a/drivers/net/wireless/ti/wlcore/io.h b/drivers/net/wireless/ti/wlcore/io.h
index bbaf7117204e..60b95033cdde 100644
--- a/drivers/net/wireless/ti/wlcore/io.h
+++ b/drivers/net/wireless/ti/wlcore/io.h
@@ -53,33 +53,33 @@ void wl1271_io_init(struct wl1271 *wl);
53int wlcore_translate_addr(struct wl1271 *wl, int addr); 53int wlcore_translate_addr(struct wl1271 *wl, int addr);
54 54
55/* Raw target IO, address is not translated */ 55/* Raw target IO, address is not translated */
56static inline void wl1271_raw_write(struct wl1271 *wl, int addr, void *buf, 56static inline int wlcore_raw_write(struct wl1271 *wl, int addr, void *buf,
57 size_t len, bool fixed) 57 size_t len, bool fixed)
58{ 58{
59 wl->if_ops->write(wl->dev, addr, buf, len, fixed); 59 return wl->if_ops->write(wl->dev, addr, buf, len, fixed);
60} 60}
61 61
62static inline void wl1271_raw_read(struct wl1271 *wl, int addr, void *buf, 62static inline int wlcore_raw_read(struct wl1271 *wl, int addr, void *buf,
63 size_t len, bool fixed) 63 size_t len, bool fixed)
64{ 64{
65 wl->if_ops->read(wl->dev, addr, buf, len, fixed); 65 return wl->if_ops->read(wl->dev, addr, buf, len, fixed);
66} 66}
67 67
68static inline void wlcore_raw_read_data(struct wl1271 *wl, int reg, void *buf, 68static inline void wlcore_raw_read_data(struct wl1271 *wl, int reg, void *buf,
69 size_t len, bool fixed) 69 size_t len, bool fixed)
70{ 70{
71 wl1271_raw_read(wl, wl->rtable[reg], buf, len, fixed); 71 wlcore_raw_read(wl, wl->rtable[reg], buf, len, fixed);
72} 72}
73 73
74static inline void wlcore_raw_write_data(struct wl1271 *wl, int reg, void *buf, 74static inline void wlcore_raw_write_data(struct wl1271 *wl, int reg, void *buf,
75 size_t len, bool fixed) 75 size_t len, bool fixed)
76{ 76{
77 wl1271_raw_write(wl, wl->rtable[reg], buf, len, fixed); 77 wlcore_raw_write(wl, wl->rtable[reg], buf, len, fixed);
78} 78}
79 79
80static inline u32 wl1271_raw_read32(struct wl1271 *wl, int addr) 80static inline u32 wl1271_raw_read32(struct wl1271 *wl, int addr)
81{ 81{
82 wl1271_raw_read(wl, addr, &wl->buffer_32, 82 wlcore_raw_read(wl, addr, &wl->buffer_32,
83 sizeof(wl->buffer_32), false); 83 sizeof(wl->buffer_32), false);
84 84
85 return le32_to_cpu(wl->buffer_32); 85 return le32_to_cpu(wl->buffer_32);
@@ -88,7 +88,7 @@ static inline u32 wl1271_raw_read32(struct wl1271 *wl, int addr)
88static inline void wl1271_raw_write32(struct wl1271 *wl, int addr, u32 val) 88static inline void wl1271_raw_write32(struct wl1271 *wl, int addr, u32 val)
89{ 89{
90 wl->buffer_32 = cpu_to_le32(val); 90 wl->buffer_32 = cpu_to_le32(val);
91 wl1271_raw_write(wl, addr, &wl->buffer_32, 91 wlcore_raw_write(wl, addr, &wl->buffer_32,
92 sizeof(wl->buffer_32), false); 92 sizeof(wl->buffer_32), false);
93} 93}
94 94
@@ -99,7 +99,7 @@ static inline void wl1271_read(struct wl1271 *wl, int addr, void *buf,
99 99
100 physical = wlcore_translate_addr(wl, addr); 100 physical = wlcore_translate_addr(wl, addr);
101 101
102 wl1271_raw_read(wl, physical, buf, len, fixed); 102 wlcore_raw_read(wl, physical, buf, len, fixed);
103} 103}
104 104
105static inline void wl1271_write(struct wl1271 *wl, int addr, void *buf, 105static inline void wl1271_write(struct wl1271 *wl, int addr, void *buf,
@@ -109,7 +109,7 @@ static inline void wl1271_write(struct wl1271 *wl, int addr, void *buf,
109 109
110 physical = wlcore_translate_addr(wl, addr); 110 physical = wlcore_translate_addr(wl, addr);
111 111
112 wl1271_raw_write(wl, physical, buf, len, fixed); 112 wlcore_raw_write(wl, physical, buf, len, fixed);
113} 113}
114 114
115static inline void wlcore_write_data(struct wl1271 *wl, int reg, void *buf, 115static inline void wlcore_write_data(struct wl1271 *wl, int reg, void *buf,
@@ -135,7 +135,7 @@ static inline void wl1271_read_hwaddr(struct wl1271 *wl, int hwaddr,
135 135
136 physical = wlcore_translate_addr(wl, addr); 136 physical = wlcore_translate_addr(wl, addr);
137 137
138 wl1271_raw_read(wl, physical, buf, len, fixed); 138 wlcore_raw_read(wl, physical, buf, len, fixed);
139} 139}
140 140
141static inline u32 wl1271_read32(struct wl1271 *wl, int addr) 141static inline u32 wl1271_read32(struct wl1271 *wl, int addr)