diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2010-07-11 06:31:23 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2010-07-12 16:05:37 -0400 |
commit | e796643eaf0889c346e6b69c5afe777c327b1919 (patch) | |
tree | 7cdac8397bc37d7c6daa85d975e88bb828e5fde4 /drivers/net/wireless/rt2x00/rt2800lib.h | |
parent | f31c9a8c1380e20e95d06925f2e42baf61af4db7 (diff) |
rt2x00: Move driver callback functions into the ops structure
All callback functions are gathered in rt2x00dev->ops except
for the callback functions which are used in rt2800lib to
acces rt2800pci/usb.
Move the priv pointer from rt2x00dev to rt2x00dev->ops and
rename it to drv to make it obvious that it is the driver callback
structure.
Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/rt2x00/rt2800lib.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2800lib.h | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2800lib.h b/drivers/net/wireless/rt2x00/rt2800lib.h index cecbd3abc35..091641e3c5e 100644 --- a/drivers/net/wireless/rt2x00/rt2800lib.h +++ b/drivers/net/wireless/rt2x00/rt2800lib.h | |||
@@ -50,7 +50,7 @@ static inline void rt2800_register_read(struct rt2x00_dev *rt2x00dev, | |||
50 | const unsigned int offset, | 50 | const unsigned int offset, |
51 | u32 *value) | 51 | u32 *value) |
52 | { | 52 | { |
53 | const struct rt2800_ops *rt2800ops = rt2x00dev->priv; | 53 | const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; |
54 | 54 | ||
55 | rt2800ops->register_read(rt2x00dev, offset, value); | 55 | rt2800ops->register_read(rt2x00dev, offset, value); |
56 | } | 56 | } |
@@ -59,7 +59,7 @@ static inline void rt2800_register_read_lock(struct rt2x00_dev *rt2x00dev, | |||
59 | const unsigned int offset, | 59 | const unsigned int offset, |
60 | u32 *value) | 60 | u32 *value) |
61 | { | 61 | { |
62 | const struct rt2800_ops *rt2800ops = rt2x00dev->priv; | 62 | const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; |
63 | 63 | ||
64 | rt2800ops->register_read_lock(rt2x00dev, offset, value); | 64 | rt2800ops->register_read_lock(rt2x00dev, offset, value); |
65 | } | 65 | } |
@@ -68,7 +68,7 @@ static inline void rt2800_register_write(struct rt2x00_dev *rt2x00dev, | |||
68 | const unsigned int offset, | 68 | const unsigned int offset, |
69 | u32 value) | 69 | u32 value) |
70 | { | 70 | { |
71 | const struct rt2800_ops *rt2800ops = rt2x00dev->priv; | 71 | const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; |
72 | 72 | ||
73 | rt2800ops->register_write(rt2x00dev, offset, value); | 73 | rt2800ops->register_write(rt2x00dev, offset, value); |
74 | } | 74 | } |
@@ -77,7 +77,7 @@ static inline void rt2800_register_write_lock(struct rt2x00_dev *rt2x00dev, | |||
77 | const unsigned int offset, | 77 | const unsigned int offset, |
78 | u32 value) | 78 | u32 value) |
79 | { | 79 | { |
80 | const struct rt2800_ops *rt2800ops = rt2x00dev->priv; | 80 | const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; |
81 | 81 | ||
82 | rt2800ops->register_write_lock(rt2x00dev, offset, value); | 82 | rt2800ops->register_write_lock(rt2x00dev, offset, value); |
83 | } | 83 | } |
@@ -86,7 +86,7 @@ static inline void rt2800_register_multiread(struct rt2x00_dev *rt2x00dev, | |||
86 | const unsigned int offset, | 86 | const unsigned int offset, |
87 | void *value, const u32 length) | 87 | void *value, const u32 length) |
88 | { | 88 | { |
89 | const struct rt2800_ops *rt2800ops = rt2x00dev->priv; | 89 | const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; |
90 | 90 | ||
91 | rt2800ops->register_multiread(rt2x00dev, offset, value, length); | 91 | rt2800ops->register_multiread(rt2x00dev, offset, value, length); |
92 | } | 92 | } |
@@ -96,7 +96,7 @@ static inline void rt2800_register_multiwrite(struct rt2x00_dev *rt2x00dev, | |||
96 | const void *value, | 96 | const void *value, |
97 | const u32 length) | 97 | const u32 length) |
98 | { | 98 | { |
99 | const struct rt2800_ops *rt2800ops = rt2x00dev->priv; | 99 | const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; |
100 | 100 | ||
101 | rt2800ops->register_multiwrite(rt2x00dev, offset, value, length); | 101 | rt2800ops->register_multiwrite(rt2x00dev, offset, value, length); |
102 | } | 102 | } |
@@ -106,7 +106,7 @@ static inline int rt2800_regbusy_read(struct rt2x00_dev *rt2x00dev, | |||
106 | const struct rt2x00_field32 field, | 106 | const struct rt2x00_field32 field, |
107 | u32 *reg) | 107 | u32 *reg) |
108 | { | 108 | { |
109 | const struct rt2800_ops *rt2800ops = rt2x00dev->priv; | 109 | const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; |
110 | 110 | ||
111 | return rt2800ops->regbusy_read(rt2x00dev, offset, field, reg); | 111 | return rt2800ops->regbusy_read(rt2x00dev, offset, field, reg); |
112 | } | 112 | } |
@@ -114,14 +114,14 @@ static inline int rt2800_regbusy_read(struct rt2x00_dev *rt2x00dev, | |||
114 | static inline int rt2800_drv_write_firmware(struct rt2x00_dev *rt2x00dev, | 114 | static inline int rt2800_drv_write_firmware(struct rt2x00_dev *rt2x00dev, |
115 | const u8 *data, const size_t len) | 115 | const u8 *data, const size_t len) |
116 | { | 116 | { |
117 | const struct rt2800_ops *rt2800ops = rt2x00dev->priv; | 117 | const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; |
118 | 118 | ||
119 | return rt2800ops->drv_write_firmware(rt2x00dev, data, len); | 119 | return rt2800ops->drv_write_firmware(rt2x00dev, data, len); |
120 | } | 120 | } |
121 | 121 | ||
122 | static inline int rt2800_drv_init_registers(struct rt2x00_dev *rt2x00dev) | 122 | static inline int rt2800_drv_init_registers(struct rt2x00_dev *rt2x00dev) |
123 | { | 123 | { |
124 | const struct rt2800_ops *rt2800ops = rt2x00dev->priv; | 124 | const struct rt2800_ops *rt2800ops = rt2x00dev->ops->drv; |
125 | 125 | ||
126 | return rt2800ops->drv_init_registers(rt2x00dev); | 126 | return rt2800ops->drv_init_registers(rt2x00dev); |
127 | } | 127 | } |