rt2x00: Remove debugfs CSR access wrappers
Move calculation of CSR register offset into rt2x00debug.c and remove the wrapper functions from each individual driver. (Except rt2500usb, which still needs to wrap for the different value type argument). Signed-off-by: Ivo van Doorn <IvDoorn@gmail.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
This commit is contained in:

committed by
John W. Linville

parent
f161796700
commit
743b97caf9
@@ -58,7 +58,7 @@
|
||||
* Register access.
|
||||
*/
|
||||
static inline void rt2x00pci_register_read(struct rt2x00_dev *rt2x00dev,
|
||||
const unsigned long offset,
|
||||
const unsigned int offset,
|
||||
u32 *value)
|
||||
{
|
||||
*value = readl(rt2x00dev->csr.base + offset);
|
||||
@@ -66,14 +66,14 @@ static inline void rt2x00pci_register_read(struct rt2x00_dev *rt2x00dev,
|
||||
|
||||
static inline void
|
||||
rt2x00pci_register_multiread(struct rt2x00_dev *rt2x00dev,
|
||||
const unsigned long offset,
|
||||
const unsigned int offset,
|
||||
void *value, const u16 length)
|
||||
{
|
||||
memcpy_fromio(value, rt2x00dev->csr.base + offset, length);
|
||||
}
|
||||
|
||||
static inline void rt2x00pci_register_write(struct rt2x00_dev *rt2x00dev,
|
||||
const unsigned long offset,
|
||||
const unsigned int offset,
|
||||
u32 value)
|
||||
{
|
||||
writel(value, rt2x00dev->csr.base + offset);
|
||||
@@ -81,7 +81,7 @@ static inline void rt2x00pci_register_write(struct rt2x00_dev *rt2x00dev,
|
||||
|
||||
static inline void
|
||||
rt2x00pci_register_multiwrite(struct rt2x00_dev *rt2x00dev,
|
||||
const unsigned long offset,
|
||||
const unsigned int offset,
|
||||
const void *value, const u16 length)
|
||||
{
|
||||
memcpy_toio(rt2x00dev->csr.base + offset, value, length);
|
||||
|
Reference in New Issue
Block a user