diff options
author | Gertjan van Wingerde <gwingerde@gmail.com> | 2009-12-22 18:03:25 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-12-28 16:31:38 -0500 |
commit | 5122d8986232ef2a761f5cf70c31666c4d65c3e4 (patch) | |
tree | 4669d6f1a6dd41c7b721788389420f9d4552b9fd /drivers/net/wireless/rt2x00/rt2x00.h | |
parent | 73a2f1259ebb49f9768aa12eee2a1071345eb7f2 (diff) |
rt2x00: Cleanup chip handling helper functions.
Let each of them take a struct rt2x00_dev pointer as argument instead of
a mixture of struct rt2x00_chip and struct rt2x00_dev pointers.
Preparation for further clean ups in the rt2x00 chip handling, especially
for rt2800 devices.
Signed-off-by: Gertjan van Wingerde <gwingerde@gmail.com>
Acked-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 | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index 194dae01d0c3..a664a999b2b0 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h | |||
@@ -937,25 +937,25 @@ static inline void rt2x00_print_chip(struct rt2x00_dev *rt2x00dev) | |||
937 | rt2x00dev->chip.rt, rt2x00dev->chip.rf, rt2x00dev->chip.rev); | 937 | rt2x00dev->chip.rt, rt2x00dev->chip.rf, rt2x00dev->chip.rev); |
938 | } | 938 | } |
939 | 939 | ||
940 | static inline char rt2x00_rt(const struct rt2x00_chip *chipset, const u16 chip) | 940 | static inline char rt2x00_rt(struct rt2x00_dev *rt2x00dev, const u16 rt) |
941 | { | 941 | { |
942 | return (chipset->rt == chip); | 942 | return (rt2x00dev->chip.rt == rt); |
943 | } | 943 | } |
944 | 944 | ||
945 | static inline char rt2x00_rf(const struct rt2x00_chip *chipset, const u16 chip) | 945 | static inline char rt2x00_rf(struct rt2x00_dev *rt2x00dev, const u16 rf) |
946 | { | 946 | { |
947 | return (chipset->rf == chip); | 947 | return (rt2x00dev->chip.rf == rf); |
948 | } | 948 | } |
949 | 949 | ||
950 | static inline u32 rt2x00_rev(const struct rt2x00_chip *chipset) | 950 | static inline u32 rt2x00_rev(struct rt2x00_dev *rt2x00dev) |
951 | { | 951 | { |
952 | return chipset->rev; | 952 | return rt2x00dev->chip.rev; |
953 | } | 953 | } |
954 | 954 | ||
955 | static inline bool rt2x00_check_rev(const struct rt2x00_chip *chipset, | 955 | static inline bool rt2x00_check_rev(struct rt2x00_dev *rt2x00dev, |
956 | const u32 mask, const u32 rev) | 956 | const u32 mask, const u32 rev) |
957 | { | 957 | { |
958 | return ((chipset->rev & mask) == rev); | 958 | return ((rt2x00dev->chip.rev & mask) == rev); |
959 | } | 959 | } |
960 | 960 | ||
961 | static inline void rt2x00_set_chip_intf(struct rt2x00_dev *rt2x00dev, | 961 | static inline void rt2x00_set_chip_intf(struct rt2x00_dev *rt2x00dev, |
@@ -964,20 +964,20 @@ static inline void rt2x00_set_chip_intf(struct rt2x00_dev *rt2x00dev, | |||
964 | rt2x00dev->chip.intf = intf; | 964 | rt2x00dev->chip.intf = intf; |
965 | } | 965 | } |
966 | 966 | ||
967 | static inline bool rt2x00_intf(const struct rt2x00_chip *chipset, | 967 | static inline bool rt2x00_intf(struct rt2x00_dev *rt2x00dev, |
968 | enum rt2x00_chip_intf intf) | 968 | enum rt2x00_chip_intf intf) |
969 | { | 969 | { |
970 | return (chipset->intf == intf); | 970 | return (rt2x00dev->chip.intf == intf); |
971 | } | 971 | } |
972 | 972 | ||
973 | static inline bool rt2x00_intf_is_pci(struct rt2x00_dev *rt2x00dev) | 973 | static inline bool rt2x00_intf_is_pci(struct rt2x00_dev *rt2x00dev) |
974 | { | 974 | { |
975 | return rt2x00_intf(&rt2x00dev->chip, RT2X00_CHIP_INTF_PCI); | 975 | return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_PCI); |
976 | } | 976 | } |
977 | 977 | ||
978 | static inline bool rt2x00_intf_is_usb(struct rt2x00_dev *rt2x00dev) | 978 | static inline bool rt2x00_intf_is_usb(struct rt2x00_dev *rt2x00dev) |
979 | { | 979 | { |
980 | return rt2x00_intf(&rt2x00dev->chip, RT2X00_CHIP_INTF_USB); | 980 | return rt2x00_intf(rt2x00dev, RT2X00_CHIP_INTF_USB); |
981 | } | 981 | } |
982 | 982 | ||
983 | /** | 983 | /** |