Thread (28 messages) 28 messages, 5 authors, 2010-08-16

Re: [PATCH v4 2/8] wireless: wl1271: support return value for the set power func

flat view
STALE5912d

From: Ohad Ben-Cohen <hidden>
Date: 2010-08-11 22:19:41
Also in: linux-arm-kernel, linux-mmc, linux-omap

On Wed, Aug 11, 2010 at 9:35 PM, DebBarma, Tarun Kanti
[off-list ref] wrote:
quoted
-     wl->if_ops->power(wl, true);
-     set_bit(WL1271_FLAG_GPIO_POWER, &wl->flags);
+     int ret = wl->if_ops->power(wl, true);
Just a minor comment, need a blank line here?

Can't hurt, thanks.

quoted
+     if (ret == 0)
+             set_bit(WL1271_FLAG_GPIO_POWER, &wl->flags);
+     return ret;
 }

diff --git a/drivers/net/wireless/wl12xx/wl1271_main.c
b/drivers/net/wireless/wl12xx/wl1271_main.c
index 9d68f00..e6e0852 100644
--- a/drivers/net/wireless/wl12xx/wl1271_main.c
+++ b/drivers/net/wireless/wl12xx/wl1271_main.c
@@ -621,7 +621,9 @@ static int wl1271_chip_wakeup(struct wl1271 *wl)
      int ret = 0;

      msleep(WL1271_PRE_POWER_ON_SLEEP);
-     wl1271_power_on(wl);
+     ret = wl1271_power_on(wl);
+     if (ret < 0)
+             goto out;
      msleep(WL1271_POWER_ON_SLEEP);
      wl1271_io_reset(wl);
      wl1271_io_init(wl);
diff --git a/drivers/net/wireless/wl12xx/wl1271_sdio.c
b/drivers/net/wireless/wl12xx/wl1271_sdio.c
index 7059b5c..c41293a 100644
--- a/drivers/net/wireless/wl12xx/wl1271_sdio.c
+++ b/drivers/net/wireless/wl12xx/wl1271_sdio.c
@@ -152,7 +152,7 @@ static void wl1271_sdio_raw_write(struct wl1271 *wl,
int addr, void *buf,

 }

-static void wl1271_sdio_set_power(struct wl1271 *wl, bool enable)
+static int wl1271_sdio_set_power(struct wl1271 *wl, bool enable)
 {
      struct sdio_func *func = wl_to_func(wl);
@@ -167,6 +167,8 @@ static void wl1271_sdio_set_power(struct wl1271 *wl,
bool enable)
              sdio_disable_func(func);
              sdio_release_host(func);
      }
+
+     return 0;
 }

 static struct wl1271_if_operations sdio_ops = {
diff --git a/drivers/net/wireless/wl12xx/wl1271_spi.c
b/drivers/net/wireless/wl12xx/wl1271_spi.c
index c3fdab7..de56d8d 100644
--- a/drivers/net/wireless/wl12xx/wl1271_spi.c
+++ b/drivers/net/wireless/wl12xx/wl1271_spi.c
@@ -312,10 +312,12 @@ static irqreturn_t wl1271_irq(int irq, void *cookie)
      return IRQ_HANDLED;
 }

-static void wl1271_spi_set_power(struct wl1271 *wl, bool enable)
+static int wl1271_spi_set_power(struct wl1271 *wl, bool enable)
 {
      if (wl->set_power)
              wl->set_power(enable);
+
+     return 0;
 }

 static struct wl1271_if_operations spi_ops = {
--
1.7.0.4

--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help