diff options
author | Luciano Coelho <coelho@ti.com> | 2011-11-21 16:55:51 (GMT) |
---|---|---|
committer | Luciano Coelho <coelho@ti.com> | 2012-04-12 05:43:56 (GMT) |
commit | ffeb501c6cba803eefc46b570feccffe61a6d883 (patch) | |
tree | fba229268593dbaa34f37a17e31eda7c7598a3b0 /drivers/net/wireless/ti/wl12xx | |
parent | b2ba99ff327f43684993c47a0f34bfa48f2ac210 (diff) | |
download | linux-ffeb501c6cba803eefc46b570feccffe61a6d883.tar.xz |
wl12xx/wlcore: initial split of probe
We need to set some parameters (eg. partition and register tables)
during probe of the lower driver, so split the probe function, leaving
most of it in wlcore, but moving the hw struct allocation to the lower
driver.
Signed-off-by: Luciano Coelho <coelho@ti.com>
Diffstat (limited to 'drivers/net/wireless/ti/wl12xx')
-rw-r--r-- | drivers/net/wireless/ti/wl12xx/main.c | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/drivers/net/wireless/ti/wl12xx/main.c b/drivers/net/wireless/ti/wl12xx/main.c index e6c3502..c4fc93f 100644 --- a/drivers/net/wireless/ti/wl12xx/main.c +++ b/drivers/net/wireless/ti/wl12xx/main.c @@ -22,7 +22,26 @@ #include <linux/module.h> #include <linux/platform_device.h> +#include <linux/err.h> + #include "../wlcore/wlcore.h" +#include "../wlcore/debug.h" + +static int __devinit wl12xx_probe(struct platform_device *pdev) +{ + struct wl1271 *wl; + struct ieee80211_hw *hw; + + hw = wlcore_alloc_hw(); + if (IS_ERR(hw)) { + wl1271_error("can't allocate hw"); + return PTR_ERR(hw); + } + + wl = hw->priv; + + return wlcore_probe(wl, pdev); +} static const struct platform_device_id wl12xx_id_table[] __devinitconst = { { "wl12xx", 0 }, @@ -31,7 +50,7 @@ static const struct platform_device_id wl12xx_id_table[] __devinitconst = { MODULE_DEVICE_TABLE(platform, wl12xx_id_table); static struct platform_driver wl12xx_driver = { - .probe = wlcore_probe, + .probe = wl12xx_probe, .remove = __devexit_p(wlcore_remove), .id_table = wl12xx_id_table, .driver = { |