summaryrefslogtreecommitdiffstats
path: root/drivers/net/wireless/wl12xx/io.h
diff options
context:
space:
mode:
authorFelipe Balbi <balbi@ti.com>2011-10-06 10:07:44 +0300
committerLuciano Coelho <coelho@ti.com>2011-10-11 16:01:09 +0300
commita390e85cfe91c346ff4745bcd45ad0a7e7101aa2 (patch)
tree789c84bbe5228b6c15dda7c1072dd220bd15dba1 /drivers/net/wireless/wl12xx/io.h
parentce2a217c8268906640ebf7291d7a06210a35dd2f (diff)
downloadop-kernel-dev-a390e85cfe91c346ff4745bcd45ad0a7e7101aa2.zip
op-kernel-dev-a390e85cfe91c346ff4745bcd45ad0a7e7101aa2.tar.gz
wl12xx: move common init code from bus modules to main
Move all common parts from sdio.c and spi.c to main.c, since they now can be handled as part of the platform driver. Signed-off-by: Felipe Balbi <balbi@ti.com> [forward-ported, cleaned-up and rephrased commit message] [added a bunch of fixes and a new pdata element] [moved some new code into main.c as well] Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/wl12xx/io.h')
-rw-r--r--drivers/net/wireless/wl12xx/io.h14
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/net/wireless/wl12xx/io.h b/drivers/net/wireless/wl12xx/io.h
index e839341..e82dad1 100644
--- a/drivers/net/wireless/wl12xx/io.h
+++ b/drivers/net/wireless/wl12xx/io.h
@@ -51,23 +51,17 @@ void wl1271_enable_interrupts(struct wl1271 *wl);
void wl1271_io_reset(struct wl1271 *wl);
void wl1271_io_init(struct wl1271 *wl);
-static inline struct device *wl1271_wl_to_dev(struct wl1271 *wl)
-{
- return wl->if_ops->dev(wl);
-}
-
-
/* Raw target IO, address is not translated */
static inline void wl1271_raw_write(struct wl1271 *wl, int addr, void *buf,
size_t len, bool fixed)
{
- wl->if_ops->write(wl, addr, buf, len, fixed);
+ wl->if_ops->write(wl->dev, addr, buf, len, fixed);
}
static inline void wl1271_raw_read(struct wl1271 *wl, int addr, void *buf,
size_t len, bool fixed)
{
- wl->if_ops->read(wl, addr, buf, len, fixed);
+ wl->if_ops->read(wl->dev, addr, buf, len, fixed);
}
static inline u32 wl1271_raw_read32(struct wl1271 *wl, int addr)
@@ -155,13 +149,13 @@ static inline void wl1271_write32(struct wl1271 *wl, int addr, u32 val)
static inline void wl1271_power_off(struct wl1271 *wl)
{
- wl->if_ops->power(wl, false);
+ wl->if_ops->power(wl->dev, false);
clear_bit(WL1271_FLAG_GPIO_POWER, &wl->flags);
}
static inline int wl1271_power_on(struct wl1271 *wl)
{
- int ret = wl->if_ops->power(wl, true);
+ int ret = wl->if_ops->power(wl->dev, true);
if (ret == 0)
set_bit(WL1271_FLAG_GPIO_POWER, &wl->flags);
OpenPOWER on IntegriCloud