diff options
author | Rafał Miłecki <zajec5@gmail.com> | 2011-05-17 20:06:43 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2011-06-01 15:10:58 -0400 |
commit | 24ca39d67968c42d377abc122f6dca635ebcdb79 (patch) | |
tree | eed68c18adb198c5030e35e24aef5b9c4e623748 /drivers/net/wireless/b43/bus.c | |
parent | 79d2232fed23e8e0d1b11abe2f9b78fb09084506 (diff) |
b43: bus: abstract bus and core operations
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 | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/drivers/net/wireless/b43/bus.c b/drivers/net/wireless/b43/bus.c index f897b7054a0a..6c63aecd6ab4 100644 --- a/drivers/net/wireless/b43/bus.c +++ b/drivers/net/wireless/b43/bus.c | |||
@@ -25,6 +25,31 @@ | |||
25 | 25 | ||
26 | 26 | ||
27 | /* SSB */ | 27 | /* SSB */ |
28 | |||
29 | static inline int b43_bus_ssb_bus_may_powerdown(struct b43_bus_dev *dev) | ||
30 | { | ||
31 | return ssb_bus_may_powerdown(dev->sdev->bus); | ||
32 | } | ||
33 | static inline int b43_bus_ssb_bus_powerup(struct b43_bus_dev *dev, | ||
34 | bool dynamic_pctl) | ||
35 | { | ||
36 | return ssb_bus_powerup(dev->sdev->bus, dynamic_pctl); | ||
37 | } | ||
38 | static inline int b43_bus_ssb_device_is_enabled(struct b43_bus_dev *dev) | ||
39 | { | ||
40 | return ssb_device_is_enabled(dev->sdev); | ||
41 | } | ||
42 | static inline void b43_bus_ssb_device_enable(struct b43_bus_dev *dev, | ||
43 | u32 core_specific_flags) | ||
44 | { | ||
45 | ssb_device_enable(dev->sdev, core_specific_flags); | ||
46 | } | ||
47 | static inline void b43_bus_ssb_device_disable(struct b43_bus_dev *dev, | ||
48 | u32 core_specific_flags) | ||
49 | { | ||
50 | ssb_device_disable(dev->sdev, core_specific_flags); | ||
51 | } | ||
52 | |||
28 | static inline u16 b43_bus_ssb_read16(struct b43_bus_dev *dev, u16 offset) | 53 | static inline u16 b43_bus_ssb_read16(struct b43_bus_dev *dev, u16 offset) |
29 | { | 54 | { |
30 | return ssb_read16(dev->sdev, offset); | 55 | return ssb_read16(dev->sdev, offset); |
@@ -63,6 +88,12 @@ struct b43_bus_dev *b43_bus_dev_ssb_init(struct ssb_device *sdev) | |||
63 | dev->bus_type = B43_BUS_SSB; | 88 | dev->bus_type = B43_BUS_SSB; |
64 | dev->sdev = sdev; | 89 | dev->sdev = sdev; |
65 | 90 | ||
91 | dev->bus_may_powerdown = b43_bus_ssb_bus_may_powerdown; | ||
92 | dev->bus_powerup = b43_bus_ssb_bus_powerup; | ||
93 | dev->device_is_enabled = b43_bus_ssb_device_is_enabled; | ||
94 | dev->device_enable = b43_bus_ssb_device_enable; | ||
95 | dev->device_disable = b43_bus_ssb_device_disable; | ||
96 | |||
66 | dev->read16 = b43_bus_ssb_read16; | 97 | dev->read16 = b43_bus_ssb_read16; |
67 | dev->read32 = b43_bus_ssb_read32; | 98 | dev->read32 = b43_bus_ssb_read32; |
68 | dev->write16 = b43_bus_ssb_write16; | 99 | dev->write16 = b43_bus_ssb_write16; |