提交 0e14f6d3 编写于 作者: A Adam Baker 提交者: David S. Miller

rt2x00: Unconstify rt2x00dev

Some register accesses need rt2x00dev to be non-const
they all need modifying so the prototype is consistent.
Signed-off-by: NAdam Baker <linux@baker-net.org.uk>
Signed-off-by: NIvo van Doorn <IvDoorn@gmail.com>
Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 d9890b8f
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
* the access attempt is considered to have failed, * the access attempt is considered to have failed,
* and we will print an error. * and we will print an error.
*/ */
static u32 rt2400pci_bbp_check(const struct rt2x00_dev *rt2x00dev) static u32 rt2400pci_bbp_check(struct rt2x00_dev *rt2x00dev)
{ {
u32 reg; u32 reg;
unsigned int i; unsigned int i;
...@@ -69,7 +69,7 @@ static u32 rt2400pci_bbp_check(const struct rt2x00_dev *rt2x00dev) ...@@ -69,7 +69,7 @@ static u32 rt2400pci_bbp_check(const struct rt2x00_dev *rt2x00dev)
return reg; return reg;
} }
static void rt2400pci_bbp_write(const struct rt2x00_dev *rt2x00dev, static void rt2400pci_bbp_write(struct rt2x00_dev *rt2x00dev,
const unsigned int word, const u8 value) const unsigned int word, const u8 value)
{ {
u32 reg; u32 reg;
...@@ -95,7 +95,7 @@ static void rt2400pci_bbp_write(const struct rt2x00_dev *rt2x00dev, ...@@ -95,7 +95,7 @@ static void rt2400pci_bbp_write(const struct rt2x00_dev *rt2x00dev,
rt2x00pci_register_write(rt2x00dev, BBPCSR, reg); rt2x00pci_register_write(rt2x00dev, BBPCSR, reg);
} }
static void rt2400pci_bbp_read(const struct rt2x00_dev *rt2x00dev, static void rt2400pci_bbp_read(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u8 *value) const unsigned int word, u8 *value)
{ {
u32 reg; u32 reg;
...@@ -132,7 +132,7 @@ static void rt2400pci_bbp_read(const struct rt2x00_dev *rt2x00dev, ...@@ -132,7 +132,7 @@ static void rt2400pci_bbp_read(const struct rt2x00_dev *rt2x00dev,
*value = rt2x00_get_field32(reg, BBPCSR_VALUE); *value = rt2x00_get_field32(reg, BBPCSR_VALUE);
} }
static void rt2400pci_rf_write(const struct rt2x00_dev *rt2x00dev, static void rt2400pci_rf_write(struct rt2x00_dev *rt2x00dev,
const unsigned int word, const u32 value) const unsigned int word, const u32 value)
{ {
u32 reg; u32 reg;
...@@ -195,13 +195,13 @@ static void rt2400pci_eepromregister_write(struct eeprom_93cx6 *eeprom) ...@@ -195,13 +195,13 @@ static void rt2400pci_eepromregister_write(struct eeprom_93cx6 *eeprom)
#ifdef CONFIG_RT2X00_LIB_DEBUGFS #ifdef CONFIG_RT2X00_LIB_DEBUGFS
#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) ) #define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) )
static void rt2400pci_read_csr(const struct rt2x00_dev *rt2x00dev, static void rt2400pci_read_csr(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u32 *data) const unsigned int word, u32 *data)
{ {
rt2x00pci_register_read(rt2x00dev, CSR_OFFSET(word), data); rt2x00pci_register_read(rt2x00dev, CSR_OFFSET(word), data);
} }
static void rt2400pci_write_csr(const struct rt2x00_dev *rt2x00dev, static void rt2400pci_write_csr(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u32 data) const unsigned int word, u32 data)
{ {
rt2x00pci_register_write(rt2x00dev, CSR_OFFSET(word), data); rt2x00pci_register_write(rt2x00dev, CSR_OFFSET(word), data);
......
...@@ -54,7 +54,7 @@ ...@@ -54,7 +54,7 @@
* the access attempt is considered to have failed, * the access attempt is considered to have failed,
* and we will print an error. * and we will print an error.
*/ */
static u32 rt2500pci_bbp_check(const struct rt2x00_dev *rt2x00dev) static u32 rt2500pci_bbp_check(struct rt2x00_dev *rt2x00dev)
{ {
u32 reg; u32 reg;
unsigned int i; unsigned int i;
...@@ -69,7 +69,7 @@ static u32 rt2500pci_bbp_check(const struct rt2x00_dev *rt2x00dev) ...@@ -69,7 +69,7 @@ static u32 rt2500pci_bbp_check(const struct rt2x00_dev *rt2x00dev)
return reg; return reg;
} }
static void rt2500pci_bbp_write(const struct rt2x00_dev *rt2x00dev, static void rt2500pci_bbp_write(struct rt2x00_dev *rt2x00dev,
const unsigned int word, const u8 value) const unsigned int word, const u8 value)
{ {
u32 reg; u32 reg;
...@@ -95,7 +95,7 @@ static void rt2500pci_bbp_write(const struct rt2x00_dev *rt2x00dev, ...@@ -95,7 +95,7 @@ static void rt2500pci_bbp_write(const struct rt2x00_dev *rt2x00dev,
rt2x00pci_register_write(rt2x00dev, BBPCSR, reg); rt2x00pci_register_write(rt2x00dev, BBPCSR, reg);
} }
static void rt2500pci_bbp_read(const struct rt2x00_dev *rt2x00dev, static void rt2500pci_bbp_read(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u8 *value) const unsigned int word, u8 *value)
{ {
u32 reg; u32 reg;
...@@ -132,7 +132,7 @@ static void rt2500pci_bbp_read(const struct rt2x00_dev *rt2x00dev, ...@@ -132,7 +132,7 @@ static void rt2500pci_bbp_read(const struct rt2x00_dev *rt2x00dev,
*value = rt2x00_get_field32(reg, BBPCSR_VALUE); *value = rt2x00_get_field32(reg, BBPCSR_VALUE);
} }
static void rt2500pci_rf_write(const struct rt2x00_dev *rt2x00dev, static void rt2500pci_rf_write(struct rt2x00_dev *rt2x00dev,
const unsigned int word, const u32 value) const unsigned int word, const u32 value)
{ {
u32 reg; u32 reg;
...@@ -195,13 +195,13 @@ static void rt2500pci_eepromregister_write(struct eeprom_93cx6 *eeprom) ...@@ -195,13 +195,13 @@ static void rt2500pci_eepromregister_write(struct eeprom_93cx6 *eeprom)
#ifdef CONFIG_RT2X00_LIB_DEBUGFS #ifdef CONFIG_RT2X00_LIB_DEBUGFS
#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) ) #define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) )
static void rt2500pci_read_csr(const struct rt2x00_dev *rt2x00dev, static void rt2500pci_read_csr(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u32 *data) const unsigned int word, u32 *data)
{ {
rt2x00pci_register_read(rt2x00dev, CSR_OFFSET(word), data); rt2x00pci_register_read(rt2x00dev, CSR_OFFSET(word), data);
} }
static void rt2500pci_write_csr(const struct rt2x00_dev *rt2x00dev, static void rt2500pci_write_csr(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u32 data) const unsigned int word, u32 data)
{ {
rt2x00pci_register_write(rt2x00dev, CSR_OFFSET(word), data); rt2x00pci_register_write(rt2x00dev, CSR_OFFSET(word), data);
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
* the access attempt is considered to have failed, * the access attempt is considered to have failed,
* and we will print an error. * and we will print an error.
*/ */
static inline void rt2500usb_register_read(const struct rt2x00_dev *rt2x00dev, static inline void rt2500usb_register_read(struct rt2x00_dev *rt2x00dev,
const unsigned int offset, const unsigned int offset,
u16 *value) u16 *value)
{ {
...@@ -64,8 +64,7 @@ static inline void rt2500usb_register_read(const struct rt2x00_dev *rt2x00dev, ...@@ -64,8 +64,7 @@ static inline void rt2500usb_register_read(const struct rt2x00_dev *rt2x00dev,
*value = le16_to_cpu(reg); *value = le16_to_cpu(reg);
} }
static inline void rt2500usb_register_multiread(const struct rt2x00_dev static inline void rt2500usb_register_multiread(struct rt2x00_dev *rt2x00dev,
*rt2x00dev,
const unsigned int offset, const unsigned int offset,
void *value, const u16 length) void *value, const u16 length)
{ {
...@@ -75,7 +74,7 @@ static inline void rt2500usb_register_multiread(const struct rt2x00_dev ...@@ -75,7 +74,7 @@ static inline void rt2500usb_register_multiread(const struct rt2x00_dev
value, length, timeout); value, length, timeout);
} }
static inline void rt2500usb_register_write(const struct rt2x00_dev *rt2x00dev, static inline void rt2500usb_register_write(struct rt2x00_dev *rt2x00dev,
const unsigned int offset, const unsigned int offset,
u16 value) u16 value)
{ {
...@@ -85,8 +84,7 @@ static inline void rt2500usb_register_write(const struct rt2x00_dev *rt2x00dev, ...@@ -85,8 +84,7 @@ static inline void rt2500usb_register_write(const struct rt2x00_dev *rt2x00dev,
&reg, sizeof(u16), REGISTER_TIMEOUT); &reg, sizeof(u16), REGISTER_TIMEOUT);
} }
static inline void rt2500usb_register_multiwrite(const struct rt2x00_dev static inline void rt2500usb_register_multiwrite(struct rt2x00_dev *rt2x00dev,
*rt2x00dev,
const unsigned int offset, const unsigned int offset,
void *value, const u16 length) void *value, const u16 length)
{ {
...@@ -96,7 +94,7 @@ static inline void rt2500usb_register_multiwrite(const struct rt2x00_dev ...@@ -96,7 +94,7 @@ static inline void rt2500usb_register_multiwrite(const struct rt2x00_dev
value, length, timeout); value, length, timeout);
} }
static u16 rt2500usb_bbp_check(const struct rt2x00_dev *rt2x00dev) static u16 rt2500usb_bbp_check(struct rt2x00_dev *rt2x00dev)
{ {
u16 reg; u16 reg;
unsigned int i; unsigned int i;
...@@ -111,7 +109,7 @@ static u16 rt2500usb_bbp_check(const struct rt2x00_dev *rt2x00dev) ...@@ -111,7 +109,7 @@ static u16 rt2500usb_bbp_check(const struct rt2x00_dev *rt2x00dev)
return reg; return reg;
} }
static void rt2500usb_bbp_write(const struct rt2x00_dev *rt2x00dev, static void rt2500usb_bbp_write(struct rt2x00_dev *rt2x00dev,
const unsigned int word, const u8 value) const unsigned int word, const u8 value)
{ {
u16 reg; u16 reg;
...@@ -136,7 +134,7 @@ static void rt2500usb_bbp_write(const struct rt2x00_dev *rt2x00dev, ...@@ -136,7 +134,7 @@ static void rt2500usb_bbp_write(const struct rt2x00_dev *rt2x00dev,
rt2500usb_register_write(rt2x00dev, PHY_CSR7, reg); rt2500usb_register_write(rt2x00dev, PHY_CSR7, reg);
} }
static void rt2500usb_bbp_read(const struct rt2x00_dev *rt2x00dev, static void rt2500usb_bbp_read(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u8 *value) const unsigned int word, u8 *value)
{ {
u16 reg; u16 reg;
...@@ -173,7 +171,7 @@ static void rt2500usb_bbp_read(const struct rt2x00_dev *rt2x00dev, ...@@ -173,7 +171,7 @@ static void rt2500usb_bbp_read(const struct rt2x00_dev *rt2x00dev,
*value = rt2x00_get_field16(reg, PHY_CSR7_DATA); *value = rt2x00_get_field16(reg, PHY_CSR7_DATA);
} }
static void rt2500usb_rf_write(const struct rt2x00_dev *rt2x00dev, static void rt2500usb_rf_write(struct rt2x00_dev *rt2x00dev,
const unsigned int word, const u32 value) const unsigned int word, const u32 value)
{ {
u16 reg; u16 reg;
...@@ -210,13 +208,13 @@ static void rt2500usb_rf_write(const struct rt2x00_dev *rt2x00dev, ...@@ -210,13 +208,13 @@ static void rt2500usb_rf_write(const struct rt2x00_dev *rt2x00dev,
#ifdef CONFIG_RT2X00_LIB_DEBUGFS #ifdef CONFIG_RT2X00_LIB_DEBUGFS
#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u16)) ) #define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u16)) )
static void rt2500usb_read_csr(const struct rt2x00_dev *rt2x00dev, static void rt2500usb_read_csr(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u32 *data) const unsigned int word, u32 *data)
{ {
rt2500usb_register_read(rt2x00dev, CSR_OFFSET(word), (u16 *) data); rt2500usb_register_read(rt2x00dev, CSR_OFFSET(word), (u16 *) data);
} }
static void rt2500usb_write_csr(const struct rt2x00_dev *rt2x00dev, static void rt2500usb_write_csr(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u32 data) const unsigned int word, u32 data)
{ {
rt2500usb_register_write(rt2x00dev, CSR_OFFSET(word), data); rt2500usb_register_write(rt2x00dev, CSR_OFFSET(word), data);
......
...@@ -782,13 +782,13 @@ struct rt2x00_dev { ...@@ -782,13 +782,13 @@ struct rt2x00_dev {
* Generic RF access. * Generic RF access.
* The RF is being accessed by word index. * The RF is being accessed by word index.
*/ */
static inline void rt2x00_rf_read(const struct rt2x00_dev *rt2x00dev, static inline void rt2x00_rf_read(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u32 *data) const unsigned int word, u32 *data)
{ {
*data = rt2x00dev->rf[word]; *data = rt2x00dev->rf[word];
} }
static inline void rt2x00_rf_write(const struct rt2x00_dev *rt2x00dev, static inline void rt2x00_rf_write(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u32 data) const unsigned int word, u32 data)
{ {
rt2x00dev->rf[word] = data; rt2x00dev->rf[word] = data;
...@@ -798,19 +798,19 @@ static inline void rt2x00_rf_write(const struct rt2x00_dev *rt2x00dev, ...@@ -798,19 +798,19 @@ static inline void rt2x00_rf_write(const struct rt2x00_dev *rt2x00dev,
* Generic EEPROM access. * Generic EEPROM access.
* The EEPROM is being accessed by word index. * The EEPROM is being accessed by word index.
*/ */
static inline void *rt2x00_eeprom_addr(const struct rt2x00_dev *rt2x00dev, static inline void *rt2x00_eeprom_addr(struct rt2x00_dev *rt2x00dev,
const unsigned int word) const unsigned int word)
{ {
return (void *)&rt2x00dev->eeprom[word]; return (void *)&rt2x00dev->eeprom[word];
} }
static inline void rt2x00_eeprom_read(const struct rt2x00_dev *rt2x00dev, static inline void rt2x00_eeprom_read(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u16 *data) const unsigned int word, u16 *data)
{ {
*data = le16_to_cpu(rt2x00dev->eeprom[word]); *data = le16_to_cpu(rt2x00dev->eeprom[word]);
} }
static inline void rt2x00_eeprom_write(const struct rt2x00_dev *rt2x00dev, static inline void rt2x00_eeprom_write(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u16 data) const unsigned int word, u16 data)
{ {
rt2x00dev->eeprom[word] = cpu_to_le16(data); rt2x00dev->eeprom[word] = cpu_to_le16(data);
......
...@@ -30,9 +30,9 @@ struct rt2x00_dev; ...@@ -30,9 +30,9 @@ struct rt2x00_dev;
#define RT2X00DEBUGFS_REGISTER_ENTRY(__name, __type) \ #define RT2X00DEBUGFS_REGISTER_ENTRY(__name, __type) \
struct reg##__name { \ struct reg##__name { \
void (*read)(const struct rt2x00_dev *rt2x00dev, \ void (*read)(struct rt2x00_dev *rt2x00dev, \
const unsigned int word, __type *data); \ const unsigned int word, __type *data); \
void (*write)(const struct rt2x00_dev *rt2x00dev, \ void (*write)(struct rt2x00_dev *rt2x00dev, \
const unsigned int word, __type data); \ const unsigned int word, __type data); \
\ \
unsigned int word_size; \ unsigned int word_size; \
......
...@@ -57,7 +57,7 @@ ...@@ -57,7 +57,7 @@
/* /*
* Register access. * Register access.
*/ */
static inline void rt2x00pci_register_read(const struct rt2x00_dev *rt2x00dev, static inline void rt2x00pci_register_read(struct rt2x00_dev *rt2x00dev,
const unsigned long offset, const unsigned long offset,
u32 *value) u32 *value)
{ {
...@@ -65,14 +65,14 @@ static inline void rt2x00pci_register_read(const struct rt2x00_dev *rt2x00dev, ...@@ -65,14 +65,14 @@ static inline void rt2x00pci_register_read(const struct rt2x00_dev *rt2x00dev,
} }
static inline void static inline void
rt2x00pci_register_multiread(const struct rt2x00_dev *rt2x00dev, rt2x00pci_register_multiread(struct rt2x00_dev *rt2x00dev,
const unsigned long offset, const unsigned long offset,
void *value, const u16 length) void *value, const u16 length)
{ {
memcpy_fromio(value, rt2x00dev->csr_addr + offset, length); memcpy_fromio(value, rt2x00dev->csr_addr + offset, length);
} }
static inline void rt2x00pci_register_write(const struct rt2x00_dev *rt2x00dev, static inline void rt2x00pci_register_write(struct rt2x00_dev *rt2x00dev,
const unsigned long offset, const unsigned long offset,
u32 value) u32 value)
{ {
...@@ -80,7 +80,7 @@ static inline void rt2x00pci_register_write(const struct rt2x00_dev *rt2x00dev, ...@@ -80,7 +80,7 @@ static inline void rt2x00pci_register_write(const struct rt2x00_dev *rt2x00dev,
} }
static inline void static inline void
rt2x00pci_register_multiwrite(const struct rt2x00_dev *rt2x00dev, rt2x00pci_register_multiwrite(struct rt2x00_dev *rt2x00dev,
const unsigned long offset, const unsigned long offset,
void *value, const u16 length) void *value, const u16 length)
{ {
......
...@@ -38,7 +38,7 @@ ...@@ -38,7 +38,7 @@
/* /*
* Interfacing with the HW. * Interfacing with the HW.
*/ */
int rt2x00usb_vendor_request(const struct rt2x00_dev *rt2x00dev, int rt2x00usb_vendor_request(struct rt2x00_dev *rt2x00dev,
const u8 request, const u8 requesttype, const u8 request, const u8 requesttype,
const u16 offset, const u16 value, const u16 offset, const u16 value,
void *buffer, const u16 buffer_length, void *buffer, const u16 buffer_length,
...@@ -76,7 +76,7 @@ int rt2x00usb_vendor_request(const struct rt2x00_dev *rt2x00dev, ...@@ -76,7 +76,7 @@ int rt2x00usb_vendor_request(const struct rt2x00_dev *rt2x00dev,
} }
EXPORT_SYMBOL_GPL(rt2x00usb_vendor_request); EXPORT_SYMBOL_GPL(rt2x00usb_vendor_request);
int rt2x00usb_vendor_request_buff(const struct rt2x00_dev *rt2x00dev, int rt2x00usb_vendor_request_buff(struct rt2x00_dev *rt2x00dev,
const u8 request, const u8 requesttype, const u8 request, const u8 requesttype,
const u16 offset, void *buffer, const u16 offset, void *buffer,
const u16 buffer_length, const int timeout) const u16 buffer_length, const int timeout)
......
...@@ -91,7 +91,7 @@ ...@@ -91,7 +91,7 @@
* a buffer allocated by kmalloc. Failure to do so can lead * a buffer allocated by kmalloc. Failure to do so can lead
* to unexpected behavior depending on the architecture. * to unexpected behavior depending on the architecture.
*/ */
int rt2x00usb_vendor_request(const struct rt2x00_dev *rt2x00dev, int rt2x00usb_vendor_request(struct rt2x00_dev *rt2x00dev,
const u8 request, const u8 requesttype, const u8 request, const u8 requesttype,
const u16 offset, const u16 value, const u16 offset, const u16 value,
void *buffer, const u16 buffer_length, void *buffer, const u16 buffer_length,
...@@ -107,7 +107,7 @@ int rt2x00usb_vendor_request(const struct rt2x00_dev *rt2x00dev, ...@@ -107,7 +107,7 @@ int rt2x00usb_vendor_request(const struct rt2x00_dev *rt2x00dev,
* kmalloc. Hence the reason for using a previously allocated cache * kmalloc. Hence the reason for using a previously allocated cache
* which has been allocated properly. * which has been allocated properly.
*/ */
int rt2x00usb_vendor_request_buff(const struct rt2x00_dev *rt2x00dev, int rt2x00usb_vendor_request_buff(struct rt2x00_dev *rt2x00dev,
const u8 request, const u8 requesttype, const u8 request, const u8 requesttype,
const u16 offset, void *buffer, const u16 offset, void *buffer,
const u16 buffer_length, const int timeout); const u16 buffer_length, const int timeout);
...@@ -117,8 +117,7 @@ int rt2x00usb_vendor_request_buff(const struct rt2x00_dev *rt2x00dev, ...@@ -117,8 +117,7 @@ int rt2x00usb_vendor_request_buff(const struct rt2x00_dev *rt2x00dev,
* command to the device. Since we don't use the buffer argument we * command to the device. Since we don't use the buffer argument we
* don't have to worry about kmalloc here. * don't have to worry about kmalloc here.
*/ */
static inline int rt2x00usb_vendor_request_sw(const struct rt2x00_dev static inline int rt2x00usb_vendor_request_sw(struct rt2x00_dev *rt2x00dev,
*rt2x00dev,
const u8 request, const u8 request,
const u16 offset, const u16 offset,
const u16 value, const u16 value,
...@@ -134,7 +133,7 @@ static inline int rt2x00usb_vendor_request_sw(const struct rt2x00_dev ...@@ -134,7 +133,7 @@ static inline int rt2x00usb_vendor_request_sw(const struct rt2x00_dev
* from the device. Note that the eeprom argument _must_ be allocated using * from the device. Note that the eeprom argument _must_ be allocated using
* kmalloc for correct handling inside the kernel USB layer. * kmalloc for correct handling inside the kernel USB layer.
*/ */
static inline int rt2x00usb_eeprom_read(const struct rt2x00_dev *rt2x00dev, static inline int rt2x00usb_eeprom_read(struct rt2x00_dev *rt2x00dev,
__le16 *eeprom, const u16 lenght) __le16 *eeprom, const u16 lenght)
{ {
int timeout = REGISTER_TIMEOUT * (lenght / sizeof(u16)); int timeout = REGISTER_TIMEOUT * (lenght / sizeof(u16));
......
...@@ -52,7 +52,7 @@ ...@@ -52,7 +52,7 @@
* the access attempt is considered to have failed, * the access attempt is considered to have failed,
* and we will print an error. * and we will print an error.
*/ */
static u32 rt61pci_bbp_check(const struct rt2x00_dev *rt2x00dev) static u32 rt61pci_bbp_check(struct rt2x00_dev *rt2x00dev)
{ {
u32 reg; u32 reg;
unsigned int i; unsigned int i;
...@@ -67,7 +67,7 @@ static u32 rt61pci_bbp_check(const struct rt2x00_dev *rt2x00dev) ...@@ -67,7 +67,7 @@ static u32 rt61pci_bbp_check(const struct rt2x00_dev *rt2x00dev)
return reg; return reg;
} }
static void rt61pci_bbp_write(const struct rt2x00_dev *rt2x00dev, static void rt61pci_bbp_write(struct rt2x00_dev *rt2x00dev,
const unsigned int word, const u8 value) const unsigned int word, const u8 value)
{ {
u32 reg; u32 reg;
...@@ -93,7 +93,7 @@ static void rt61pci_bbp_write(const struct rt2x00_dev *rt2x00dev, ...@@ -93,7 +93,7 @@ static void rt61pci_bbp_write(const struct rt2x00_dev *rt2x00dev,
rt2x00pci_register_write(rt2x00dev, PHY_CSR3, reg); rt2x00pci_register_write(rt2x00dev, PHY_CSR3, reg);
} }
static void rt61pci_bbp_read(const struct rt2x00_dev *rt2x00dev, static void rt61pci_bbp_read(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u8 *value) const unsigned int word, u8 *value)
{ {
u32 reg; u32 reg;
...@@ -130,7 +130,7 @@ static void rt61pci_bbp_read(const struct rt2x00_dev *rt2x00dev, ...@@ -130,7 +130,7 @@ static void rt61pci_bbp_read(const struct rt2x00_dev *rt2x00dev,
*value = rt2x00_get_field32(reg, PHY_CSR3_VALUE); *value = rt2x00_get_field32(reg, PHY_CSR3_VALUE);
} }
static void rt61pci_rf_write(const struct rt2x00_dev *rt2x00dev, static void rt61pci_rf_write(struct rt2x00_dev *rt2x00dev,
const unsigned int word, const u32 value) const unsigned int word, const u32 value)
{ {
u32 reg; u32 reg;
...@@ -160,7 +160,7 @@ static void rt61pci_rf_write(const struct rt2x00_dev *rt2x00dev, ...@@ -160,7 +160,7 @@ static void rt61pci_rf_write(const struct rt2x00_dev *rt2x00dev,
rt2x00_rf_write(rt2x00dev, word, value); rt2x00_rf_write(rt2x00dev, word, value);
} }
static void rt61pci_mcu_request(const struct rt2x00_dev *rt2x00dev, static void rt61pci_mcu_request(struct rt2x00_dev *rt2x00dev,
const u8 command, const u8 token, const u8 command, const u8 token,
const u8 arg0, const u8 arg1) const u8 arg0, const u8 arg1)
{ {
...@@ -220,13 +220,13 @@ static void rt61pci_eepromregister_write(struct eeprom_93cx6 *eeprom) ...@@ -220,13 +220,13 @@ static void rt61pci_eepromregister_write(struct eeprom_93cx6 *eeprom)
#ifdef CONFIG_RT2X00_LIB_DEBUGFS #ifdef CONFIG_RT2X00_LIB_DEBUGFS
#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) ) #define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) )
static void rt61pci_read_csr(const struct rt2x00_dev *rt2x00dev, static void rt61pci_read_csr(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u32 *data) const unsigned int word, u32 *data)
{ {
rt2x00pci_register_read(rt2x00dev, CSR_OFFSET(word), data); rt2x00pci_register_read(rt2x00dev, CSR_OFFSET(word), data);
} }
static void rt61pci_write_csr(const struct rt2x00_dev *rt2x00dev, static void rt61pci_write_csr(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u32 data) const unsigned int word, u32 data)
{ {
rt2x00pci_register_write(rt2x00dev, CSR_OFFSET(word), data); rt2x00pci_register_write(rt2x00dev, CSR_OFFSET(word), data);
......
...@@ -53,7 +53,7 @@ ...@@ -53,7 +53,7 @@
* the access attempt is considered to have failed, * the access attempt is considered to have failed,
* and we will print an error. * and we will print an error.
*/ */
static inline void rt73usb_register_read(const struct rt2x00_dev *rt2x00dev, static inline void rt73usb_register_read(struct rt2x00_dev *rt2x00dev,
const unsigned int offset, u32 *value) const unsigned int offset, u32 *value)
{ {
__le32 reg; __le32 reg;
...@@ -63,8 +63,7 @@ static inline void rt73usb_register_read(const struct rt2x00_dev *rt2x00dev, ...@@ -63,8 +63,7 @@ static inline void rt73usb_register_read(const struct rt2x00_dev *rt2x00dev,
*value = le32_to_cpu(reg); *value = le32_to_cpu(reg);
} }
static inline void rt73usb_register_multiread(const struct rt2x00_dev static inline void rt73usb_register_multiread(struct rt2x00_dev *rt2x00dev,
*rt2x00dev,
const unsigned int offset, const unsigned int offset,
void *value, const u32 length) void *value, const u32 length)
{ {
...@@ -74,7 +73,7 @@ static inline void rt73usb_register_multiread(const struct rt2x00_dev ...@@ -74,7 +73,7 @@ static inline void rt73usb_register_multiread(const struct rt2x00_dev
value, length, timeout); value, length, timeout);
} }
static inline void rt73usb_register_write(const struct rt2x00_dev *rt2x00dev, static inline void rt73usb_register_write(struct rt2x00_dev *rt2x00dev,
const unsigned int offset, u32 value) const unsigned int offset, u32 value)
{ {
__le32 reg = cpu_to_le32(value); __le32 reg = cpu_to_le32(value);
...@@ -83,8 +82,7 @@ static inline void rt73usb_register_write(const struct rt2x00_dev *rt2x00dev, ...@@ -83,8 +82,7 @@ static inline void rt73usb_register_write(const struct rt2x00_dev *rt2x00dev,
&reg, sizeof(u32), REGISTER_TIMEOUT); &reg, sizeof(u32), REGISTER_TIMEOUT);
} }
static inline void rt73usb_register_multiwrite(const struct rt2x00_dev static inline void rt73usb_register_multiwrite(struct rt2x00_dev *rt2x00dev,
*rt2x00dev,
const unsigned int offset, const unsigned int offset,
void *value, const u32 length) void *value, const u32 length)
{ {
...@@ -94,7 +92,7 @@ static inline void rt73usb_register_multiwrite(const struct rt2x00_dev ...@@ -94,7 +92,7 @@ static inline void rt73usb_register_multiwrite(const struct rt2x00_dev
value, length, timeout); value, length, timeout);
} }
static u32 rt73usb_bbp_check(const struct rt2x00_dev *rt2x00dev) static u32 rt73usb_bbp_check(struct rt2x00_dev *rt2x00dev)
{ {
u32 reg; u32 reg;
unsigned int i; unsigned int i;
...@@ -109,7 +107,7 @@ static u32 rt73usb_bbp_check(const struct rt2x00_dev *rt2x00dev) ...@@ -109,7 +107,7 @@ static u32 rt73usb_bbp_check(const struct rt2x00_dev *rt2x00dev)
return reg; return reg;
} }
static void rt73usb_bbp_write(const struct rt2x00_dev *rt2x00dev, static void rt73usb_bbp_write(struct rt2x00_dev *rt2x00dev,
const unsigned int word, const u8 value) const unsigned int word, const u8 value)
{ {
u32 reg; u32 reg;
...@@ -135,7 +133,7 @@ static void rt73usb_bbp_write(const struct rt2x00_dev *rt2x00dev, ...@@ -135,7 +133,7 @@ static void rt73usb_bbp_write(const struct rt2x00_dev *rt2x00dev,
rt73usb_register_write(rt2x00dev, PHY_CSR3, reg); rt73usb_register_write(rt2x00dev, PHY_CSR3, reg);
} }
static void rt73usb_bbp_read(const struct rt2x00_dev *rt2x00dev, static void rt73usb_bbp_read(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u8 *value) const unsigned int word, u8 *value)
{ {
u32 reg; u32 reg;
...@@ -172,7 +170,7 @@ static void rt73usb_bbp_read(const struct rt2x00_dev *rt2x00dev, ...@@ -172,7 +170,7 @@ static void rt73usb_bbp_read(const struct rt2x00_dev *rt2x00dev,
*value = rt2x00_get_field32(reg, PHY_CSR3_VALUE); *value = rt2x00_get_field32(reg, PHY_CSR3_VALUE);
} }
static void rt73usb_rf_write(const struct rt2x00_dev *rt2x00dev, static void rt73usb_rf_write(struct rt2x00_dev *rt2x00dev,
const unsigned int word, const u32 value) const unsigned int word, const u32 value)
{ {
u32 reg; u32 reg;
...@@ -212,13 +210,13 @@ static void rt73usb_rf_write(const struct rt2x00_dev *rt2x00dev, ...@@ -212,13 +210,13 @@ static void rt73usb_rf_write(const struct rt2x00_dev *rt2x00dev,
#ifdef CONFIG_RT2X00_LIB_DEBUGFS #ifdef CONFIG_RT2X00_LIB_DEBUGFS
#define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) ) #define CSR_OFFSET(__word) ( CSR_REG_BASE + ((__word) * sizeof(u32)) )
static void rt73usb_read_csr(const struct rt2x00_dev *rt2x00dev, static void rt73usb_read_csr(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u32 *data) const unsigned int word, u32 *data)
{ {
rt73usb_register_read(rt2x00dev, CSR_OFFSET(word), data); rt73usb_register_read(rt2x00dev, CSR_OFFSET(word), data);
} }
static void rt73usb_write_csr(const struct rt2x00_dev *rt2x00dev, static void rt73usb_write_csr(struct rt2x00_dev *rt2x00dev,
const unsigned int word, u32 data) const unsigned int word, u32 data)
{ {
rt73usb_register_write(rt2x00dev, CSR_OFFSET(word), data); rt73usb_register_write(rt2x00dev, CSR_OFFSET(word), data);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册