diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2009-05-05 13:46:08 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-05-06 15:15:04 -0400 |
commit | 358623c22c9fd837b3b1b444377037f72553dc9f (patch) | |
tree | fcf4b4838edde6924157473086e8b7130f120ebd /drivers/net/wireless/rt2x00/rt2x00.h | |
parent | 6cfe62cd58da862db04d4eb61f218f65b0cedbb3 (diff) |
rt2x00: Simplify rt2x00_check_rev
rt2x00_check_rev() was too specific for rt2500usb and rt73usb,
by adding the mask argument (instead of hardcoding it into
the function itself) we can use the function in rt2800usb as
well.
v2: Fix revision mask for rt2800usb
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/rt2x00.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00.h | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 8d933ee30583..419b1b9f998e 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -915,11 +915,10 @@ static inline u32 rt2x00_rev(const struct rt2x00_chip *chipset) | |||
915 | return chipset->rev; | 915 | return chipset->rev; |
916 | } | 916 | } |
917 | 917 | ||
918 | static inline u16 rt2x00_check_rev(const struct rt2x00_chip *chipset, | 918 | static inline bool rt2x00_check_rev(const struct rt2x00_chip *chipset, |
919 | const u32 rev) | 919 | const u32 mask, const u32 rev) |
920 | { | 920 | { |
921 | return (((chipset->rev & 0xffff0) == rev) && | 921 | return ((chipset->rev & mask) == rev); |
922 | !!(chipset->rev & 0x0000f)); | ||
923 | } | 922 | } |
924 | 923 | ||
925 | /** | 924 | /** |