]> err.no Git - linux-2.6/commitdiff
dvb frontends: treat firmware data as const
authorDavid Woodhouse <dwmw2@infradead.org>
Fri, 23 May 2008 23:12:23 +0000 (00:12 +0100)
committerDavid Woodhouse <David.Woodhouse@intel.com>
Thu, 10 Jul 2008 13:26:31 +0000 (14:26 +0100)
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
drivers/media/dvb/frontends/bcm3510.c
drivers/media/dvb/frontends/nxt200x.c
drivers/media/dvb/frontends/or51211.c
drivers/media/dvb/frontends/sp8870.c
drivers/media/dvb/frontends/sp887x.c
drivers/media/dvb/frontends/tda10048.c
drivers/media/dvb/frontends/tda1004x.c

index d268e65e777d69acdc513e55f705a1064b0e05b8..cf5e576dfdcfaa6c836f3fb2d8af6433bb45fb72 100644 (file)
@@ -590,7 +590,8 @@ static void bcm3510_release(struct dvb_frontend* fe)
  */
 #define BCM3510_DEFAULT_FIRMWARE "dvb-fe-bcm3510-01.fw"
 
-static int bcm3510_write_ram(struct bcm3510_state *st, u16 addr, u8 *b, u16 len)
+static int bcm3510_write_ram(struct bcm3510_state *st, u16 addr, const u8 *b,
+                            u16 len)
 {
        int ret = 0,i;
        bcm3510_register_value vH, vL,vD;
@@ -614,7 +615,7 @@ static int bcm3510_download_firmware(struct dvb_frontend* fe)
        struct bcm3510_state* st = fe->demodulator_priv;
        const struct firmware *fw;
        u16 addr,len;
-       u8  *b;
+       const u8 *b;
        int ret,i;
 
        deb_info("requesting firmware\n");
index 23d022852543a1a3c9dfd7a0fdc2f2eb35799b5a..af298358e822e4048cf7b03c312cf5abb73e7312 100644 (file)
@@ -93,7 +93,8 @@ static u8 i2c_readbytes (struct nxt200x_state* state, u8 addr, u8* buf, u8 len)
        return 0;
 }
 
-static int nxt200x_writebytes (struct nxt200x_state* state, u8 reg, u8 *buf, u8 len)
+static int nxt200x_writebytes (struct nxt200x_state* state, u8 reg,
+                              const u8 *buf, u8 len)
 {
        u8 buf2 [len+1];
        int err;
index 7eaa4765593f039dc82c4983baeac5dedfeb787f..6afe12aaca4e53d6ab417279c5c143e69d271c72 100644 (file)
@@ -69,7 +69,7 @@ struct or51211_state {
        u32 current_frequency;
 };
 
-static int i2c_writebytes (struct or51211_state* state, u8 reg, u8 *buf,
+static int i2c_writebytes (struct or51211_state* state, u8 reg, const u8 *buf,
                           int len)
 {
        int err;
@@ -77,7 +77,7 @@ static int i2c_writebytes (struct or51211_state* state, u8 reg, u8 *buf,
        msg.addr        = reg;
        msg.flags       = 0;
        msg.len         = len;
-       msg.buf         = buf;
+       msg.buf         = (u8 *)buf;
 
        if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) {
                printk(KERN_WARNING "or51211: i2c_writebytes error "
index aa78aa14aad927564108b19afa05a74efdabd646..1c9a9b4051b9efdbc8a4a9eba005d74f883c4e11 100644 (file)
@@ -98,7 +98,7 @@ static int sp8870_readreg (struct sp8870_state* state, u16 reg)
 static int sp8870_firmware_upload (struct sp8870_state* state, const struct firmware *fw)
 {
        struct i2c_msg msg;
-       char *fw_buf = fw->data;
+       const char *fw_buf = fw->data;
        int fw_pos;
        u8 tx_buf[255];
        int tx_len;
index 49f55877f51366f66e1b5225caf1e4fc756ad595..4543609e181619aae2b7746855e88c346112901a 100644 (file)
@@ -140,7 +140,7 @@ static int sp887x_initial_setup (struct dvb_frontend* fe, const struct firmware
        u8 buf [BLOCKSIZE+2];
        int i;
        int fw_size = fw->size;
-       unsigned char *mem = fw->data;
+       const unsigned char *mem = fw->data;
 
        dprintk("%s\n", __func__);
 
index 090fb7dd93c644d7796b4559d9301f1ead2a8045..0ab8d86b3ae3e4d859d51c54e87febef04c62c06 100644 (file)
@@ -233,7 +233,7 @@ static u8 tda10048_readreg(struct tda10048_state *state, u8 reg)
 }
 
 static int tda10048_writeregbulk(struct tda10048_state *state, u8 reg,
-       u8 *data, u16 len)
+                                const u8 *data, u16 len)
 {
        int ret = -EREMOTEIO;
        struct i2c_msg msg;
index a0d6386535673223f557c8d068e233e9a900a239..1465ff77b0cb4884a84a2ea168093dc073e30236 100644 (file)
@@ -317,7 +317,7 @@ static int tda10046h_set_bandwidth(struct tda1004x_state *state,
 }
 
 static int tda1004x_do_upload(struct tda1004x_state *state,
-                             unsigned char *mem, unsigned int len,
+                             const unsigned char *mem, unsigned int len,
                              u8 dspCodeCounterReg, u8 dspCodeInReg)
 {
        u8 buf[65];