aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@infradead.org>2008-05-23 19:12:23 -0400
committerDavid Woodhouse <David.Woodhouse@intel.com>2008-07-10 09:26:31 -0400
commitbc179153ae2334efe28cf4f3300e024da7d83753 (patch)
tree9c300ab3a81d43da5d30d633106626f82a58d564 /drivers
parent99b6e4f511e38ea7beae35ee1b46b440151ce727 (diff)
dvb frontends: treat firmware data as const
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/media/dvb/frontends/bcm3510.c5
-rw-r--r--drivers/media/dvb/frontends/nxt200x.c3
-rw-r--r--drivers/media/dvb/frontends/or51211.c4
-rw-r--r--drivers/media/dvb/frontends/sp8870.c2
-rw-r--r--drivers/media/dvb/frontends/sp887x.c2
-rw-r--r--drivers/media/dvb/frontends/tda10048.c2
-rw-r--r--drivers/media/dvb/frontends/tda1004x.c2
7 files changed, 11 insertions, 9 deletions
diff --git a/drivers/media/dvb/frontends/bcm3510.c b/drivers/media/dvb/frontends/bcm3510.c
index d268e65e777..cf5e576dfdc 100644
--- a/drivers/media/dvb/frontends/bcm3510.c
+++ b/drivers/media/dvb/frontends/bcm3510.c
@@ -590,7 +590,8 @@ static void bcm3510_release(struct dvb_frontend* fe)
590 */ 590 */
591#define BCM3510_DEFAULT_FIRMWARE "dvb-fe-bcm3510-01.fw" 591#define BCM3510_DEFAULT_FIRMWARE "dvb-fe-bcm3510-01.fw"
592 592
593static int bcm3510_write_ram(struct bcm3510_state *st, u16 addr, u8 *b, u16 len) 593static int bcm3510_write_ram(struct bcm3510_state *st, u16 addr, const u8 *b,
594 u16 len)
594{ 595{
595 int ret = 0,i; 596 int ret = 0,i;
596 bcm3510_register_value vH, vL,vD; 597 bcm3510_register_value vH, vL,vD;
@@ -614,7 +615,7 @@ static int bcm3510_download_firmware(struct dvb_frontend* fe)
614 struct bcm3510_state* st = fe->demodulator_priv; 615 struct bcm3510_state* st = fe->demodulator_priv;
615 const struct firmware *fw; 616 const struct firmware *fw;
616 u16 addr,len; 617 u16 addr,len;
617 u8 *b; 618 const u8 *b;
618 int ret,i; 619 int ret,i;
619 620
620 deb_info("requesting firmware\n"); 621 deb_info("requesting firmware\n");
diff --git a/drivers/media/dvb/frontends/nxt200x.c b/drivers/media/dvb/frontends/nxt200x.c
index 23d02285254..af298358e82 100644
--- a/drivers/media/dvb/frontends/nxt200x.c
+++ b/drivers/media/dvb/frontends/nxt200x.c
@@ -93,7 +93,8 @@ static u8 i2c_readbytes (struct nxt200x_state* state, u8 addr, u8* buf, u8 len)
93 return 0; 93 return 0;
94} 94}
95 95
96static int nxt200x_writebytes (struct nxt200x_state* state, u8 reg, u8 *buf, u8 len) 96static int nxt200x_writebytes (struct nxt200x_state* state, u8 reg,
97 const u8 *buf, u8 len)
97{ 98{
98 u8 buf2 [len+1]; 99 u8 buf2 [len+1];
99 int err; 100 int err;
diff --git a/drivers/media/dvb/frontends/or51211.c b/drivers/media/dvb/frontends/or51211.c
index 7eaa4765593..6afe12aaca4 100644
--- a/drivers/media/dvb/frontends/or51211.c
+++ b/drivers/media/dvb/frontends/or51211.c
@@ -69,7 +69,7 @@ struct or51211_state {
69 u32 current_frequency; 69 u32 current_frequency;
70}; 70};
71 71
72static int i2c_writebytes (struct or51211_state* state, u8 reg, u8 *buf, 72static int i2c_writebytes (struct or51211_state* state, u8 reg, const u8 *buf,
73 int len) 73 int len)
74{ 74{
75 int err; 75 int err;
@@ -77,7 +77,7 @@ static int i2c_writebytes (struct or51211_state* state, u8 reg, u8 *buf,
77 msg.addr = reg; 77 msg.addr = reg;
78 msg.flags = 0; 78 msg.flags = 0;
79 msg.len = len; 79 msg.len = len;
80 msg.buf = buf; 80 msg.buf = (u8 *)buf;
81 81
82 if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) { 82 if ((err = i2c_transfer (state->i2c, &msg, 1)) != 1) {
83 printk(KERN_WARNING "or51211: i2c_writebytes error " 83 printk(KERN_WARNING "or51211: i2c_writebytes error "
diff --git a/drivers/media/dvb/frontends/sp8870.c b/drivers/media/dvb/frontends/sp8870.c
index aa78aa14aad..1c9a9b4051b 100644
--- a/drivers/media/dvb/frontends/sp8870.c
+++ b/drivers/media/dvb/frontends/sp8870.c
@@ -98,7 +98,7 @@ static int sp8870_readreg (struct sp8870_state* state, u16 reg)
98static int sp8870_firmware_upload (struct sp8870_state* state, const struct firmware *fw) 98static int sp8870_firmware_upload (struct sp8870_state* state, const struct firmware *fw)
99{ 99{
100 struct i2c_msg msg; 100 struct i2c_msg msg;
101 char *fw_buf = fw->data; 101 const char *fw_buf = fw->data;
102 int fw_pos; 102 int fw_pos;
103 u8 tx_buf[255]; 103 u8 tx_buf[255];
104 int tx_len; 104 int tx_len;
diff --git a/drivers/media/dvb/frontends/sp887x.c b/drivers/media/dvb/frontends/sp887x.c
index 49f55877f51..4543609e181 100644
--- a/drivers/media/dvb/frontends/sp887x.c
+++ b/drivers/media/dvb/frontends/sp887x.c
@@ -140,7 +140,7 @@ static int sp887x_initial_setup (struct dvb_frontend* fe, const struct firmware
140 u8 buf [BLOCKSIZE+2]; 140 u8 buf [BLOCKSIZE+2];
141 int i; 141 int i;
142 int fw_size = fw->size; 142 int fw_size = fw->size;
143 unsigned char *mem = fw->data; 143 const unsigned char *mem = fw->data;
144 144
145 dprintk("%s\n", __func__); 145 dprintk("%s\n", __func__);
146 146
diff --git a/drivers/media/dvb/frontends/tda10048.c b/drivers/media/dvb/frontends/tda10048.c
index 090fb7dd93c..0ab8d86b3ae 100644
--- a/drivers/media/dvb/frontends/tda10048.c
+++ b/drivers/media/dvb/frontends/tda10048.c
@@ -233,7 +233,7 @@ static u8 tda10048_readreg(struct tda10048_state *state, u8 reg)
233} 233}
234 234
235static int tda10048_writeregbulk(struct tda10048_state *state, u8 reg, 235static int tda10048_writeregbulk(struct tda10048_state *state, u8 reg,
236 u8 *data, u16 len) 236 const u8 *data, u16 len)
237{ 237{
238 int ret = -EREMOTEIO; 238 int ret = -EREMOTEIO;
239 struct i2c_msg msg; 239 struct i2c_msg msg;
diff --git a/drivers/media/dvb/frontends/tda1004x.c b/drivers/media/dvb/frontends/tda1004x.c
index a0d63865356..1465ff77b0c 100644
--- a/drivers/media/dvb/frontends/tda1004x.c
+++ b/drivers/media/dvb/frontends/tda1004x.c
@@ -317,7 +317,7 @@ static int tda10046h_set_bandwidth(struct tda1004x_state *state,
317} 317}
318 318
319static int tda1004x_do_upload(struct tda1004x_state *state, 319static int tda1004x_do_upload(struct tda1004x_state *state,
320 unsigned char *mem, unsigned int len, 320 const unsigned char *mem, unsigned int len,
321 u8 dspCodeCounterReg, u8 dspCodeInReg) 321 u8 dspCodeCounterReg, u8 dspCodeInReg)
322{ 322{
323 u8 buf[65]; 323 u8 buf[65];