diff options
author | Ivo van Doorn <ivdoorn@gmail.com> | 2008-02-10 16:49:13 -0500 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2008-02-29 15:37:19 -0500 |
commit | 21795094e2b71b4b11bfb468321046c1336cef69 (patch) | |
tree | de99ccc0f93ba165574db3b55fd9c0839dd65bed /drivers/net/wireless/rt2x00/rt2x00pci.h | |
parent | f590f48e87d1e61c03f01fa15be00e852c05426d (diff) |
rt2x00: make csr_cache and csr_addr an union
The csr_cache and csr_addr pointers are both the same size
and they are never used both by the same driver. This makes
them a nice candidate for an union.
We could merge into 1 pointer, but that would either upset sparse,
or require a lot of __force casts.
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/rt2x00pci.h')
-rw-r--r-- | drivers/net/wireless/rt2x00/rt2x00pci.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.h b/drivers/net/wireless/rt2x00/rt2x00pci.h index 71335e16b058..8932b31d2624 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.h +++ b/drivers/net/wireless/rt2x00/rt2x00pci.h | |||
@@ -61,7 +61,7 @@ static inline void rt2x00pci_register_read(struct rt2x00_dev *rt2x00dev, | |||
61 | const unsigned long offset, | 61 | const unsigned long offset, |
62 | u32 *value) | 62 | u32 *value) |
63 | { | 63 | { |
64 | *value = readl(rt2x00dev->csr_addr + offset); | 64 | *value = readl(rt2x00dev->csr.base + offset); |
65 | } | 65 | } |
66 | 66 | ||
67 | static inline void | 67 | static inline void |
@@ -69,14 +69,14 @@ rt2x00pci_register_multiread(struct rt2x00_dev *rt2x00dev, | |||
69 | const unsigned long offset, | 69 | const unsigned long offset, |
70 | void *value, const u16 length) | 70 | void *value, const u16 length) |
71 | { | 71 | { |
72 | memcpy_fromio(value, rt2x00dev->csr_addr + offset, length); | 72 | memcpy_fromio(value, rt2x00dev->csr.base + offset, length); |
73 | } | 73 | } |
74 | 74 | ||
75 | static inline void rt2x00pci_register_write(struct rt2x00_dev *rt2x00dev, | 75 | static inline void rt2x00pci_register_write(struct rt2x00_dev *rt2x00dev, |
76 | const unsigned long offset, | 76 | const unsigned long offset, |
77 | u32 value) | 77 | u32 value) |
78 | { | 78 | { |
79 | writel(value, rt2x00dev->csr_addr + offset); | 79 | writel(value, rt2x00dev->csr.base + offset); |
80 | } | 80 | } |
81 | 81 | ||
82 | static inline void | 82 | static inline void |
@@ -84,7 +84,7 @@ rt2x00pci_register_multiwrite(struct rt2x00_dev *rt2x00dev, | |||
84 | const unsigned long offset, | 84 | const unsigned long offset, |
85 | void *value, const u16 length) | 85 | void *value, const u16 length) |
86 | { | 86 | { |
87 | memcpy_toio(rt2x00dev->csr_addr + offset, value, length); | 87 | memcpy_toio(rt2x00dev->csr.base + offset, value, length); |
88 | } | 88 | } |
89 | 89 | ||
90 | /* | 90 | /* |