diff mbox

[RFC/PATCH,04/13] net: wl12xx: care for optional operations

Message ID 1305321990-22041-5-git-send-email-balbi@ti.com
State Not Applicable, archived
Delegated to: David Miller
Headers show

Commit Message

Felipe Balbi May 13, 2011, 9:26 p.m. UTC
->init and ->reset are optional - at least
sdio.c doesn't implement them - so allow those
pointers to be NULL.

Signed-off-by: Felipe Balbi <balbi@ti.com>
---
 drivers/net/wireless/wl12xx/io.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

Comments

Luciano Coelho May 20, 2011, 12:03 p.m. UTC | #1
On Sat, 2011-05-14 at 00:26 +0300, Felipe Balbi wrote:
> ->init and ->reset are optional - at least
> sdio.c doesn't implement them - so allow those
> pointers to be NULL.
> 
> Signed-off-by: Felipe Balbi <balbi@ti.com>
> ---

Applied.
diff mbox

Patch

diff --git a/drivers/net/wireless/wl12xx/io.c b/drivers/net/wireless/wl12xx/io.c
index d557f73..57bc646 100644
--- a/drivers/net/wireless/wl12xx/io.c
+++ b/drivers/net/wireless/wl12xx/io.c
@@ -117,12 +117,14 @@  EXPORT_SYMBOL_GPL(wl1271_set_partition);
 
 void wl1271_io_reset(struct wl1271 *wl)
 {
-	wl->if_ops->reset(wl);
+	if (wl->if_ops->reset)
+		wl->if_ops->reset(wl);
 }
 
 void wl1271_io_init(struct wl1271 *wl)
 {
-	wl->if_ops->init(wl);
+	if (wl->if_ops->init)
+		wl->if_ops->init(wl);
 }
 
 void wl1271_top_reg_write(struct wl1271 *wl, int addr, u16 val)