Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314888
b: refs/heads/master
c: 02eb1d9
h: refs/heads/master
v: v3
  • Loading branch information
Ido Yariv authored and Luciano Coelho committed Jun 22, 2012
1 parent 5e02e92 commit 13f77c9
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: b666bb7f2fe2bdc0309b0d58afb48eae85d92221
refs/heads/master: 02eb1d9d3bc307e2b540b8c095fa19342789f86d
16 changes: 10 additions & 6 deletions trunk/drivers/net/wireless/ti/wlcore/sdio.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,8 @@ static void wl1271_sdio_set_block_size(struct device *child,
sdio_release_host(func);
}

static void wl12xx_sdio_raw_read(struct device *child, int addr, void *buf,
size_t len, bool fixed)
static int wl12xx_sdio_raw_read(struct device *child, int addr, void *buf,
size_t len, bool fixed)
{
int ret;
struct wl12xx_sdio_glue *glue = dev_get_drvdata(child->parent);
Expand Down Expand Up @@ -103,12 +103,14 @@ static void wl12xx_sdio_raw_read(struct device *child, int addr, void *buf,

sdio_release_host(func);

if (ret)
if (WARN_ON(ret))
dev_err(child->parent, "sdio read failed (%d)\n", ret);

return ret;
}

static void wl12xx_sdio_raw_write(struct device *child, int addr, void *buf,
size_t len, bool fixed)
static int wl12xx_sdio_raw_write(struct device *child, int addr, void *buf,
size_t len, bool fixed)
{
int ret;
struct wl12xx_sdio_glue *glue = dev_get_drvdata(child->parent);
Expand Down Expand Up @@ -139,8 +141,10 @@ static void wl12xx_sdio_raw_write(struct device *child, int addr, void *buf,

sdio_release_host(func);

if (ret)
if (WARN_ON(ret))
dev_err(child->parent, "sdio write failed (%d)\n", ret);

return ret;
}

static int wl12xx_sdio_power_on(struct wl12xx_sdio_glue *glue)
Expand Down
14 changes: 9 additions & 5 deletions trunk/drivers/net/wireless/ti/wlcore/spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,8 @@ static int wl12xx_spi_read_busy(struct device *child)
return -ETIMEDOUT;
}

static void wl12xx_spi_raw_read(struct device *child, int addr, void *buf,
size_t len, bool fixed)
static int wl12xx_spi_raw_read(struct device *child, int addr, void *buf,
size_t len, bool fixed)
{
struct wl12xx_spi_glue *glue = dev_get_drvdata(child->parent);
struct wl1271 *wl = dev_get_drvdata(child);
Expand Down Expand Up @@ -238,7 +238,7 @@ static void wl12xx_spi_raw_read(struct device *child, int addr, void *buf,
if (!(busy_buf[WL1271_BUSY_WORD_CNT - 1] & 0x1) &&
wl12xx_spi_read_busy(child)) {
memset(buf, 0, chunk_len);
return;
return 0;
}

spi_message_init(&m);
Expand All @@ -256,10 +256,12 @@ static void wl12xx_spi_raw_read(struct device *child, int addr, void *buf,
buf += chunk_len;
len -= chunk_len;
}

return 0;
}

static void wl12xx_spi_raw_write(struct device *child, int addr, void *buf,
size_t len, bool fixed)
static int wl12xx_spi_raw_write(struct device *child, int addr, void *buf,
size_t len, bool fixed)
{
struct wl12xx_spi_glue *glue = dev_get_drvdata(child->parent);
struct spi_transfer t[2 * WSPI_MAX_NUM_OF_CHUNKS];
Expand Down Expand Up @@ -304,6 +306,8 @@ static void wl12xx_spi_raw_write(struct device *child, int addr, void *buf,
}

spi_sync(to_spi_device(glue->dev), &m);

return 0;
}

static struct wl1271_if_operations spi_ops = {
Expand Down
6 changes: 3 additions & 3 deletions trunk/drivers/net/wireless/ti/wlcore/wlcore_i.h
Original file line number Diff line number Diff line change
Expand Up @@ -209,9 +209,9 @@ struct wl1271_scan {
};

struct wl1271_if_operations {
void (*read)(struct device *child, int addr, void *buf, size_t len,
bool fixed);
void (*write)(struct device *child, int addr, void *buf, size_t len,
int (*read)(struct device *child, int addr, void *buf, size_t len,
bool fixed);
int (*write)(struct device *child, int addr, void *buf, size_t len,
bool fixed);
void (*reset)(struct device *child);
void (*init)(struct device *child);
Expand Down

0 comments on commit 13f77c9

Please sign in to comment.