From: Felipe Balbi Date: Fri, 13 May 2011 21:26:21 +0000 (+0300) Subject: net: wl12xx: care for optional operations X-Git-Tag: firefly_0821_release~3680^2~4429^2~12^2~42^2~234^2~34 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=77d7d7a36d270fee4591c1c99c83c2da1f399d44;p=firefly-linux-kernel-4.4.55.git net: wl12xx: care for optional operations ->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 Signed-off-by: Luciano Coelho --- diff --git a/drivers/net/wireless/wl12xx/io.c b/drivers/net/wireless/wl12xx/io.c index da5c1ad942a4..f37a7933f900 100644 --- a/drivers/net/wireless/wl12xx/io.c +++ b/drivers/net/wireless/wl12xx/io.c @@ -128,12 +128,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)