diff options
author | Rajat Jain <rajatja@google.com> | 2016-11-15 16:36:03 +0300 |
---|---|---|
committer | Kalle Valo <kvalo@codeaurora.org> | 2016-11-19 10:13:11 +0300 |
commit | 5e28e5fbdcf03907abea24b1bdc387333cebee38 (patch) | |
tree | e5ddf80f530ae863389f35f1c0a7a83ee75ff286 /drivers/net/wireless/marvell/mwifiex/main.c | |
parent | 2e02b5814217b734fed1054aac4d1e256acbe6a9 (diff) | |
download | linux-5e28e5fbdcf03907abea24b1bdc387333cebee38.tar.xz |
mwifiex: Introduce mwifiex_probe_of() to parse common properties
Introduce function mwifiex_probe_of() to parse common properties.
Interface drivers get to decide whether or not the device tree node
was a valid one (depending on the compatible property),
Lets fill "adapter->dt_node" in mwifiex_add_card().
The function mwifiex_probe_of() is currently only a place holder with
the next patch adding content to it.
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 | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/net/wireless/marvell/mwifiex/main.c b/drivers/net/wireless/marvell/mwifiex/main.c index dcceab2899e5..835d33014086 100644 --- a/drivers/net/wireless/marvell/mwifiex/main.c +++ b/drivers/net/wireless/marvell/mwifiex/main.c @@ -1552,6 +1552,16 @@ void mwifiex_do_flr(struct mwifiex_adapter *adapter, bool prepare) } EXPORT_SYMBOL_GPL(mwifiex_do_flr); +static void mwifiex_probe_of(struct mwifiex_adapter *adapter) +{ + struct device *dev = adapter->dev; + + if (!dev->of_node) + return; + + adapter->dt_node = dev->of_node; +} + /* * This function adds the card. * @@ -1581,6 +1591,8 @@ mwifiex_add_card(void *card, struct semaphore *sem, } adapter->dev = dev; + mwifiex_probe_of(adapter); + adapter->iface_type = iface_type; adapter->card_sem = sem; |