diff options
author | Christian Lamparter <chunkeey@web.de> | 2009-03-05 23:30:10 +0300 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-03-17 01:09:27 +0300 |
commit | 2ac710720c523dd243662746da4381dd4f1772f8 (patch) | |
tree | b57dc667249ee4cbacbcc8f33686637ee3c304b2 /drivers/net/wireless/p54/p54common.c | |
parent | fbf95296c1c8b1ba09bdea0438ce2c61e0e3be5d (diff) | |
download | linux-2ac710720c523dd243662746da4381dd4f1772f8.tar.xz |
p54: unify ieee80211 device registration
All three drivers (p54pci, p54usb and p54spi) are implementing the
same functionality three times. So, why not put it into the shared library?!
Signed-off-by: Christian Lamparter <chunkeey@web.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/p54/p54common.c')
-rw-r--r-- | drivers/net/wireless/p54/p54common.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c index 14438a642fdd..42d1cac609a1 100644 --- a/drivers/net/wireless/p54/p54common.c +++ b/drivers/net/wireless/p54/p54common.c @@ -2489,6 +2489,21 @@ struct ieee80211_hw *p54_init_common(size_t priv_data_len) } EXPORT_SYMBOL_GPL(p54_init_common); +int p54_register_common(struct ieee80211_hw *dev, struct device *pdev) +{ + int err; + + err = ieee80211_register_hw(dev); + if (err) { + dev_err(pdev, "Cannot register device (%d).\n", err); + return err; + } + + dev_info(pdev, "is registered as '%s'\n", wiphy_name(dev->wiphy)); + return 0; +} +EXPORT_SYMBOL_GPL(p54_register_common); + void p54_free_common(struct ieee80211_hw *dev) { struct p54_common *priv = dev->priv; |