From 6dfff895fa33b8576f82a38cee8abe5f73561e24 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Fri, 23 May 2008 18:37:51 +0100 Subject: libertas: treat firmware data as const Signed-off-by: David Woodhouse --- drivers/net/wireless/libertas/if_cs.c | 2 +- drivers/net/wireless/libertas/if_sdio.c | 4 ++-- drivers/net/wireless/libertas/if_usb.c | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'drivers/net/wireless') diff --git a/drivers/net/wireless/libertas/if_cs.c b/drivers/net/wireless/libertas/if_cs.c index 54280e292ea5..d075b448da94 100644 --- a/drivers/net/wireless/libertas/if_cs.c +++ b/drivers/net/wireless/libertas/if_cs.c @@ -122,7 +122,7 @@ static inline void if_cs_write16(struct if_cs_card *card, uint reg, u16 val) static inline void if_cs_write16_rep( struct if_cs_card *card, uint reg, - void *buf, + const void *buf, unsigned long count) { if (debug_output) diff --git a/drivers/net/wireless/libertas/if_sdio.c b/drivers/net/wireless/libertas/if_sdio.c index 51f664bbee9d..3dd537be87d8 100644 --- a/drivers/net/wireless/libertas/if_sdio.c +++ b/drivers/net/wireless/libertas/if_sdio.c @@ -392,7 +392,7 @@ static int if_sdio_prog_helper(struct if_sdio_card *card) unsigned long timeout; u8 *chunk_buffer; u32 chunk_size; - u8 *firmware; + const u8 *firmware; size_t size; lbs_deb_enter(LBS_DEB_SDIO); @@ -508,7 +508,7 @@ static int if_sdio_prog_real(struct if_sdio_card *card) unsigned long timeout; u8 *chunk_buffer; u32 chunk_size; - u8 *firmware; + const u8 *firmware; size_t size, req_size; lbs_deb_enter(LBS_DEB_SDIO); diff --git a/drivers/net/wireless/libertas/if_usb.c b/drivers/net/wireless/libertas/if_usb.c index 36288b29abf7..4dcd4092e0f0 100644 --- a/drivers/net/wireless/libertas/if_usb.c +++ b/drivers/net/wireless/libertas/if_usb.c @@ -293,7 +293,7 @@ static void if_usb_disconnect(struct usb_interface *intf) static int if_usb_send_fw_pkt(struct if_usb_card *cardp) { struct fwdata *fwdata = cardp->ep_out_buf; - uint8_t *firmware = cardp->fw->data; + const uint8_t *firmware = cardp->fw->data; /* If we got a CRC failure on the last block, back up and retry it */ @@ -746,7 +746,7 @@ static int if_usb_issue_boot_command(struct if_usb_card *cardp, int ivalue) * len image length * @return 0 or -1 */ -static int check_fwfile_format(uint8_t *data, uint32_t totlen) +static int check_fwfile_format(const uint8_t *data, uint32_t totlen) { uint32_t bincmd, exit; uint32_t blksize, offset, len; -- cgit v1.2.3 From 45ef0bdb18a37bcf102e2a18c757227f8b192a36 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sat, 24 May 2008 00:08:19 +0100 Subject: zd1201: treat firmware data as const Signed-off-by: David Woodhouse --- drivers/net/wireless/zd1201.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/net/wireless') diff --git a/drivers/net/wireless/zd1201.c b/drivers/net/wireless/zd1201.c index d5c0c66188ca..78baa0f7926d 100644 --- a/drivers/net/wireless/zd1201.c +++ b/drivers/net/wireless/zd1201.c @@ -49,7 +49,7 @@ MODULE_DEVICE_TABLE(usb, zd1201_table); static int zd1201_fw_upload(struct usb_device *dev, int apfw) { const struct firmware *fw_entry; - char *data; + const char *data; unsigned long len; int err; unsigned char ret; -- cgit v1.2.3 From f160ebcbeb6c9b79a770f22e14398158dac3de00 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sat, 24 May 2008 00:08:39 +0100 Subject: 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(-) (limited to 'drivers/net/wireless') 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; -- cgit v1.2.3 From 8b72eb4333aba692a16339acf8a74d84b10d3568 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sat, 24 May 2008 00:08:55 +0100 Subject: p54: treat firmware data as const Signed-off-by: David Woodhouse --- drivers/net/wireless/p54/p54usb.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'drivers/net/wireless') diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c index 1610a7308c1d..815c095ef797 100644 --- a/drivers/net/wireless/p54/p54usb.c +++ b/drivers/net/wireless/p54/p54usb.c @@ -376,7 +376,8 @@ static int p54u_upload_firmware_3887(struct ieee80211_hw *dev) const struct firmware *fw_entry = NULL; int err, alen; u8 carry = 0; - u8 *buf, *tmp, *data; + u8 *buf, *tmp; + const u8 *data; unsigned int left, remains, block_size; struct x2_header *hdr; unsigned long timeout; @@ -523,7 +524,7 @@ static int p54u_upload_firmware_net2280(struct ieee80211_hw *dev) void *buf; __le32 reg; unsigned int remains, offset; - u8 *data; + const u8 *data; buf = kmalloc(512, GFP_KERNEL); if (!buf) { -- cgit v1.2.3 From 2f26e8afb22d79f655def146894595a39aeea1f8 Mon Sep 17 00:00:00 2001 From: David Woodhouse Date: Sat, 24 May 2008 00:09:29 +0100 Subject: atmel: treat firmware data as const Signed-off-by: David Woodhouse --- drivers/net/wireless/atmel.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'drivers/net/wireless') diff --git a/drivers/net/wireless/atmel.c b/drivers/net/wireless/atmel.c index 438e63ecccf1..d1acef7e0b14 100644 --- a/drivers/net/wireless/atmel.c +++ b/drivers/net/wireless/atmel.c @@ -560,7 +560,7 @@ static const struct { static void build_wpa_mib(struct atmel_private *priv); static int atmel_ioctl(struct net_device *dev, struct ifreq *rq, int cmd); static void atmel_copy_to_card(struct net_device *dev, u16 dest, - unsigned char *src, u16 len); + const unsigned char *src, u16 len); static void atmel_copy_to_host(struct net_device *dev, unsigned char *dest, u16 src, u16 len); static void atmel_set_gcr(struct net_device *dev, u16 mask); @@ -3853,7 +3853,7 @@ static int reset_atmel_card(struct net_device *dev) if (priv->card_type == CARD_TYPE_EEPROM) { /* copy in firmware if needed */ const struct firmware *fw_entry = NULL; - unsigned char *fw; + const unsigned char *fw; int len = priv->firmware_length; if (!(fw = priv->firmware)) { if (priv->firmware_type == ATMEL_FW_TYPE_NONE) { @@ -4120,7 +4120,7 @@ static void atmel_writeAR(struct net_device *dev, u16 data) } static void atmel_copy_to_card(struct net_device *dev, u16 dest, - unsigned char *src, u16 len) + const unsigned char *src, u16 len) { int i; atmel_writeAR(dev, dest); -- cgit v1.2.3