diff options
author | Rajat Jain | 2016-11-15 14:36:02 +0100 |
---|---|---|
committer | Kalle Valo | 2016-11-19 08:13:11 +0100 |
commit | 2e02b5814217b734fed1054aac4d1e256acbe6a9 (patch) | |
tree | 2ddce83dbf045a292c9d8958aa2bb44c2bee8292 /drivers/net/wireless/marvell/mwifiex/main.c | |
parent | mwifiex: parse device tree node for PCIe (diff) | |
download | kernel-qcow2-linux-2e02b5814217b734fed1054aac4d1e256acbe6a9.tar.gz kernel-qcow2-linux-2e02b5814217b734fed1054aac4d1e256acbe6a9.tar.xz kernel-qcow2-linux-2e02b5814217b734fed1054aac4d1e256acbe6a9.zip |
mwifiex: Allow mwifiex early access to device structure
Today all the interface drivers (usb/pcie/sdio) assign the
adapter->dev in the register_dev() callback, although they
have this piece of info well before hand.
This patch makes the device structure available for mwifiex
right at the beginning, so that it can be used for early
initialization if needed.
This is needed for subsequent patches in this patchset that
intend to unify and consolidate some of the code that would
otherwise have to be duplicated among the interface drivers
(sdio, pcie, usb).
Signed-off-by: Rajat Jain <rajatja@google.com>
Signed-off-by: Amitkumar Karwar <akarwar@marvell.com>
Signed-off-by: Kalle Valo <kvalo@codeaurora.org>
Diffstat (limited to 'drivers/net/wireless/marvell/mwifiex/main.c')
-rw-r--r-- | drivers/net/wireless/marvell/mwifiex/main.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c index 2478ccd6f2d9..dcceab2899e5 100644 --- a/drivers/net/wireless/marvell/mwifiex/main.c +++ b/drivers/net/wireless/marvell/mwifiex/main.c @@ -1567,7 +1567,8 @@ EXPORT_SYMBOL_GPL(mwifiex_do_flr); */ int mwifiex_add_card(void *card, struct semaphore *sem, - struct mwifiex_if_ops *if_ops, u8 iface_type) + struct mwifiex_if_ops *if_ops, u8 iface_type, + struct device *dev) { struct mwifiex_adapter *adapter; @@ -1579,6 +1580,7 @@ mwifiex_add_card(void *card, struct semaphore *sem, goto err_init_sw; } + adapter->dev = dev; adapter->iface_type = iface_type; adapter->card_sem = sem; |