Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ueagle-atm: treat firmware data as const

Signed-off-by: David Woodhouse <dwmw2@infradead.org>

authored by

David Woodhouse and committed by
David Woodhouse
aafcd2f7 2f0600b6

+11 -9
+11 -9
drivers/usb/atm/ueagle-atm.c
··· 579 579 * uea_send_modem_cmd - Send a command for pre-firmware devices. 580 580 */ 581 581 static int uea_send_modem_cmd(struct usb_device *usb, 582 - u16 addr, u16 size, u8 * buff) 582 + u16 addr, u16 size, const u8 *buff) 583 583 { 584 584 int ret = -ENOMEM; 585 585 u8 *xfer_buff; ··· 604 604 static void uea_upload_pre_firmware(const struct firmware *fw_entry, void *context) 605 605 { 606 606 struct usb_device *usb = context; 607 - u8 *pfw, value; 607 + const u8 *pfw; 608 + u8 value; 608 609 u32 crc = 0; 609 610 int ret, size; 610 611 ··· 721 720 /* 722 721 * Make sure that the DSP code provided is safe to use. 723 722 */ 724 - static int check_dsp_e1(u8 *dsp, unsigned int len) 723 + static int check_dsp_e1(const u8 *dsp, unsigned int len) 725 724 { 726 725 u8 pagecount, blockcount; 727 726 u16 blocksize; ··· 772 771 return 0; 773 772 } 774 773 775 - static int check_dsp_e4(u8 *dsp, int len) 774 + static int check_dsp_e4(const u8 *dsp, int len) 776 775 { 777 776 int i; 778 777 struct l1_code *p = (struct l1_code *) dsp; ··· 820 819 /* 821 820 * send data to the idma pipe 822 821 * */ 823 - static int uea_idma_write(struct uea_softc *sc, void *data, u32 size) 822 + static int uea_idma_write(struct uea_softc *sc, const void *data, u32 size) 824 823 { 825 824 int ret = -ENOMEM; 826 825 u8 *xfer_buff; ··· 904 903 u16 ovl = sc->ovl; 905 904 struct block_info_e1 bi; 906 905 907 - u8 *p; 906 + const u8 *p; 908 907 u8 pagecount, blockcount; 909 908 u16 blockaddr, blocksize; 910 909 u32 pageoffset; ··· 987 986 bi.wReserved = cpu_to_be16(UEA_RESERVED); 988 987 989 988 do { 990 - u8 *blockoffset; 989 + const u8 *blockoffset; 991 990 unsigned int blocksize; 992 991 993 992 blockidx = &p->page_header[blockno]; ··· 1096 1095 #define UCDC_SEND_ENCAPSULATED_COMMAND 0x00 1097 1096 1098 1097 static int uea_request(struct uea_softc *sc, 1099 - u16 value, u16 index, u16 size, void *data) 1098 + u16 value, u16 index, u16 size, const void *data) 1100 1099 { 1101 1100 u8 *xfer_buff; 1102 1101 int ret = -ENOMEM; ··· 1892 1891 { 1893 1892 const struct firmware *fw_entry; 1894 1893 int ret, size, u, ln; 1895 - u8 *pfw, value; 1894 + const u8 *pfw; 1895 + u8 value; 1896 1896 char *fw_name = FW_DIR "930-fpga.bin"; 1897 1897 1898 1898 uea_enters(INS_TO_USBDEV(sc));