aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/atm/ueagle-atm.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/atm/ueagle-atm.c')
-rw-r--r--drivers/usb/atm/ueagle-atm.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/drivers/usb/atm/ueagle-atm.c b/drivers/usb/atm/ueagle-atm.c
index 5f71ff3aee35..cb01b5106efd 100644
--- a/drivers/usb/atm/ueagle-atm.c
+++ b/drivers/usb/atm/ueagle-atm.c
@@ -579,7 +579,7 @@ MODULE_PARM_DESC(annex,
579 * uea_send_modem_cmd - Send a command for pre-firmware devices. 579 * uea_send_modem_cmd - Send a command for pre-firmware devices.
580 */ 580 */
581static int uea_send_modem_cmd(struct usb_device *usb, 581static 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 int ret = -ENOMEM; 584 int ret = -ENOMEM;
585 u8 *xfer_buff; 585 u8 *xfer_buff;
@@ -604,7 +604,8 @@ static int uea_send_modem_cmd(struct usb_device *usb,
604static void uea_upload_pre_firmware(const struct firmware *fw_entry, void *context) 604static void uea_upload_pre_firmware(const struct firmware *fw_entry, void *context)
605{ 605{
606 struct usb_device *usb = context; 606 struct usb_device *usb = context;
607 u8 *pfw, value; 607 const u8 *pfw;
608 u8 value;
608 u32 crc = 0; 609 u32 crc = 0;
609 int ret, size; 610 int ret, size;
610 611
@@ -720,7 +721,7 @@ static int uea_load_firmware(struct usb_device *usb, unsigned int ver)
720/* 721/*
721 * Make sure that the DSP code provided is safe to use. 722 * Make sure that the DSP code provided is safe to use.
722 */ 723 */
723static int check_dsp_e1(u8 *dsp, unsigned int len) 724static int check_dsp_e1(const u8 *dsp, unsigned int len)
724{ 725{
725 u8 pagecount, blockcount; 726 u8 pagecount, blockcount;
726 u16 blocksize; 727 u16 blocksize;
@@ -771,7 +772,7 @@ static int check_dsp_e1(u8 *dsp, unsigned int len)
771 return 0; 772 return 0;
772} 773}
773 774
774static int check_dsp_e4(u8 *dsp, int len) 775static int check_dsp_e4(const u8 *dsp, int len)
775{ 776{
776 int i; 777 int i;
777 struct l1_code *p = (struct l1_code *) dsp; 778 struct l1_code *p = (struct l1_code *) dsp;
@@ -819,7 +820,7 @@ static int check_dsp_e4(u8 *dsp, int len)
819/* 820/*
820 * send data to the idma pipe 821 * send data to the idma pipe
821 * */ 822 * */
822static int uea_idma_write(struct uea_softc *sc, void *data, u32 size) 823static int uea_idma_write(struct uea_softc *sc, const void *data, u32 size)
823{ 824{
824 int ret = -ENOMEM; 825 int ret = -ENOMEM;
825 u8 *xfer_buff; 826 u8 *xfer_buff;
@@ -903,7 +904,7 @@ static void uea_load_page_e1(struct work_struct *work)
903 u16 ovl = sc->ovl; 904 u16 ovl = sc->ovl;
904 struct block_info_e1 bi; 905 struct block_info_e1 bi;
905 906
906 u8 *p; 907 const u8 *p;
907 u8 pagecount, blockcount; 908 u8 pagecount, blockcount;
908 u16 blockaddr, blocksize; 909 u16 blockaddr, blocksize;
909 u32 pageoffset; 910 u32 pageoffset;
@@ -986,7 +987,7 @@ static void __uea_load_page_e4(struct uea_softc *sc, u8 pageno, int boot)
986 bi.wReserved = cpu_to_be16(UEA_RESERVED); 987 bi.wReserved = cpu_to_be16(UEA_RESERVED);
987 988
988 do { 989 do {
989 u8 *blockoffset; 990 const u8 *blockoffset;
990 unsigned int blocksize; 991 unsigned int blocksize;
991 992
992 blockidx = &p->page_header[blockno]; 993 blockidx = &p->page_header[blockno];
@@ -1095,7 +1096,7 @@ static inline int wait_cmv_ack(struct uea_softc *sc)
1095#define UCDC_SEND_ENCAPSULATED_COMMAND 0x00 1096#define UCDC_SEND_ENCAPSULATED_COMMAND 0x00
1096 1097
1097static int uea_request(struct uea_softc *sc, 1098static int uea_request(struct uea_softc *sc,
1098 u16 value, u16 index, u16 size, void *data) 1099 u16 value, u16 index, u16 size, const void *data)
1099{ 1100{
1100 u8 *xfer_buff; 1101 u8 *xfer_buff;
1101 int ret = -ENOMEM; 1102 int ret = -ENOMEM;
@@ -1891,7 +1892,8 @@ static int load_XILINX_firmware(struct uea_softc *sc)
1891{ 1892{
1892 const struct firmware *fw_entry; 1893 const struct firmware *fw_entry;
1893 int ret, size, u, ln; 1894 int ret, size, u, ln;
1894 u8 *pfw, value; 1895 const u8 *pfw;
1896 u8 value;
1895 char *fw_name = FW_DIR "930-fpga.bin"; 1897 char *fw_name = FW_DIR "930-fpga.bin";
1896 1898
1897 uea_enters(INS_TO_USBDEV(sc)); 1899 uea_enters(INS_TO_USBDEV(sc));