diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2011-07-06 17:45:28 +0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-07-08 19:11:21 +0400 |
commit | 74abacb6b5b91141eb8963faa2f22b3f1bd7c68d (patch) | |
tree | 22bef5fa0551da97250f20fcc62bf11d6404a11c /drivers/net/wireless/b43/bus.c | |
parent | 42c9a458965da2b74e772054fdc4bcdec0351da8 (diff) | |
download | linux-74abacb6b5b91141eb8963faa2f22b3f1bd7c68d.tar.xz |
b43: bus: add helpers for getting/setting wldev from/in bus core
Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/b43/bus.c')
-rw-r--r-- | drivers/net/wireless/b43/bus.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/bus.c b/drivers/net/wireless/b43/bus.c index c45c76dc49c7..a5e61a9fb539 100644 --- a/drivers/net/wireless/b43/bus.c +++ b/drivers/net/wireless/b43/bus.c @@ -225,3 +225,32 @@ struct b43_bus_dev *b43_bus_dev_ssb_init(struct ssb_device *sdev) return dev; } #endif /* CONFIG_B43_SSB */ + +void *b43_bus_get_wldev(struct b43_bus_dev *dev) +{ + switch (dev->bus_type) { +#ifdef CONFIG_B43_BCMA + case B43_BUS_BCMA: + return bcma_get_drvdata(dev->bdev); +#endif +#ifdef CONFIG_B43_SSB + case B43_BUS_SSB: + return ssb_get_drvdata(dev->sdev); +#endif + } + return NULL; +} + +void b43_bus_set_wldev(struct b43_bus_dev *dev, void *wldev) +{ + switch (dev->bus_type) { +#ifdef CONFIG_B43_BCMA + case B43_BUS_BCMA: + bcma_set_drvdata(dev->bdev, wldev); +#endif +#ifdef CONFIG_B43_SSB + case B43_BUS_SSB: + ssb_set_drvdata(dev->sdev, wldev); +#endif + } +} |