From f160ebcbeb6c9b79a770f22e14398158dac3de00 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sat, 24 May 2008 00:08:39 +0100 Subject: [PATCH] rt2x00: treat firmware data as const Signed-off-by: David Woodhouse --- drivers/net/wireless/rt2x00/rt2x00.h | 4 ++-- drivers/net/wireless/rt2x00/rt2x00pci.h | 2 +- drivers/net/wireless/rt2x00/rt61pci.c | 4 ++-- drivers/net/wireless/rt2x00/rt73usb.c | 6 +++--- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/wireless/rt2x00/rt2x00.h b/drivers/net/wireless/rt2x00/rt2x00.h index b4bf1e09cf9a..a74e1a5c56fd 100644 --- a/drivers/net/wireless/rt2x00/rt2x00.h +++ b/drivers/net/wireless/rt2x00/rt2x00.h @@ -511,8 +511,8 @@ struct rt2x00lib_ops { */ int (*probe_hw) (struct rt2x00_dev *rt2x00dev); char *(*get_firmware_name) (struct rt2x00_dev *rt2x00dev); - u16 (*get_firmware_crc) (void *data, const size_t len); - int (*load_firmware) (struct rt2x00_dev *rt2x00dev, void *data, + u16 (*get_firmware_crc) (const void *data, const size_t len); + int (*load_firmware) (struct rt2x00_dev *rt2x00dev, const void *data, const size_t len); /* diff --git a/drivers/net/wireless/rt2x00/rt2x00pci.h b/drivers/net/wireless/rt2x00/rt2x00pci.h index 9d1cdb99431c..b41967ecbf6d 100644 --- a/drivers/net/wireless/rt2x00/rt2x00pci.h +++ b/drivers/net/wireless/rt2x00/rt2x00pci.h @@ -82,7 +82,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, - void *value, const u16 length) + const void *value, const u16 length) { memcpy_toio(rt2x00dev->csr.base + offset, value, length); } diff --git a/drivers/net/wireless/rt2x00/rt61pci.c b/drivers/net/wireless/rt2x00/rt61pci.c index 14bc7b281659..bb78de5290cd 100644 --- a/drivers/net/wireless/rt2x00/rt61pci.c +++ b/drivers/net/wireless/rt2x00/rt61pci.c @@ -915,7 +915,7 @@ static char *rt61pci_get_firmware_name(struct rt2x00_dev *rt2x00dev) return fw_name; } -static u16 rt61pci_get_firmware_crc(void *data, const size_t len) +static u16 rt61pci_get_firmware_crc(const void *data, const size_t len) { u16 crc; @@ -932,7 +932,7 @@ static u16 rt61pci_get_firmware_crc(void *data, const size_t len) return crc; } -static int rt61pci_load_firmware(struct rt2x00_dev *rt2x00dev, void *data, +static int rt61pci_load_firmware(struct rt2x00_dev *rt2x00dev, const void *data, const size_t len) { int i; diff --git a/drivers/net/wireless/rt2x00/rt73usb.c b/drivers/net/wireless/rt2x00/rt73usb.c index 83cc0147f698..d5a6c21235c8 100644 --- a/drivers/net/wireless/rt2x00/rt73usb.c +++ b/drivers/net/wireless/rt2x00/rt73usb.c @@ -856,7 +856,7 @@ static char *rt73usb_get_firmware_name(struct rt2x00_dev *rt2x00dev) return FIRMWARE_RT2571; } -static u16 rt73usb_get_firmware_crc(void *data, const size_t len) +static u16 rt73usb_get_firmware_crc(const void *data, const size_t len) { u16 crc; @@ -873,13 +873,13 @@ static u16 rt73usb_get_firmware_crc(void *data, const size_t len) return crc; } -static int rt73usb_load_firmware(struct rt2x00_dev *rt2x00dev, void *data, +static int rt73usb_load_firmware(struct rt2x00_dev *rt2x00dev, const void *data, const size_t len) { unsigned int i; int status; u32 reg; - char *ptr = data; + const char *ptr = data; char *cache; int buflen; int timeout; -- 2.20.1