mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-22 14:41:27 +00:00
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 <balbi@ti.com> Signed-off-by: Luciano Coelho <coelho@ti.com>
This commit is contained in:
parent
6bdaf79623
commit
77d7d7a36d
1 changed files with 4 additions and 2 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue