Skip to content

Commit

Permalink
net: wl12xx: care for optional operations
Browse files Browse the repository at this point in the history
->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>
Signed-off-by: Luciano Coelho <coelho@ti.com>
  • Loading branch information
Felipe Balbi authored and Luciano Coelho committed Jun 27, 2011
1 parent 6bdaf79 commit 77d7d7a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions drivers/net/wireless/wl12xx/io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 77d7d7a

Please sign in to comment.