libertas: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
This commit is contained in:
committed by
David Woodhouse
parent
6329d3021b
commit
6dfff895fa
@@ -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(
|
static inline void if_cs_write16_rep(
|
||||||
struct if_cs_card *card,
|
struct if_cs_card *card,
|
||||||
uint reg,
|
uint reg,
|
||||||
void *buf,
|
const void *buf,
|
||||||
unsigned long count)
|
unsigned long count)
|
||||||
{
|
{
|
||||||
if (debug_output)
|
if (debug_output)
|
||||||
|
@@ -392,7 +392,7 @@ static int if_sdio_prog_helper(struct if_sdio_card *card)
|
|||||||
unsigned long timeout;
|
unsigned long timeout;
|
||||||
u8 *chunk_buffer;
|
u8 *chunk_buffer;
|
||||||
u32 chunk_size;
|
u32 chunk_size;
|
||||||
u8 *firmware;
|
const u8 *firmware;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
|
||||||
lbs_deb_enter(LBS_DEB_SDIO);
|
lbs_deb_enter(LBS_DEB_SDIO);
|
||||||
@@ -508,7 +508,7 @@ static int if_sdio_prog_real(struct if_sdio_card *card)
|
|||||||
unsigned long timeout;
|
unsigned long timeout;
|
||||||
u8 *chunk_buffer;
|
u8 *chunk_buffer;
|
||||||
u32 chunk_size;
|
u32 chunk_size;
|
||||||
u8 *firmware;
|
const u8 *firmware;
|
||||||
size_t size, req_size;
|
size_t size, req_size;
|
||||||
|
|
||||||
lbs_deb_enter(LBS_DEB_SDIO);
|
lbs_deb_enter(LBS_DEB_SDIO);
|
||||||
|
@@ -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)
|
static int if_usb_send_fw_pkt(struct if_usb_card *cardp)
|
||||||
{
|
{
|
||||||
struct fwdata *fwdata = cardp->ep_out_buf;
|
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
|
/* If we got a CRC failure on the last block, back
|
||||||
up and retry it */
|
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
|
* len image length
|
||||||
* @return 0 or -1
|
* @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 bincmd, exit;
|
||||||
uint32_t blksize, offset, len;
|
uint32_t blksize, offset, len;
|
||||||
|
Reference in New Issue
Block a user