Skip to content

Commit

Permalink
V4L/DVB (8247): Fix a const pointer assignment error in the drx397xD …
Browse files Browse the repository at this point in the history
…demodulator driver

Fix an assignment of a const pointer to a non-const pointer in the drx397xD
demodulator driver.

This was introduced in patch eb9bd0e567365d4f607d32d8c41e201da65aa971.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
David Howells authored and Mauro Carvalho Chehab committed Jul 23, 2008
1 parent 22b0119 commit e272ae0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions drivers/media/dvb/frontends/drx397xD.c
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ static struct {
const struct firmware *file;
rwlock_t lock;
int refcnt;
u8 *data[ARRAY_SIZE(blob_name)];
const u8 *data[ARRAY_SIZE(blob_name)];
} fw[] = {
#define _FW_ENTRY(a, b) { \
.name = a, \
Expand Down Expand Up @@ -109,7 +109,7 @@ static void drx_release_fw(struct drx397xD_state *s)

static int drx_load_fw(struct drx397xD_state *s, fw_ix_t ix)
{
u8 *data;
const u8 *data;
size_t size, len;
int i = 0, j, rc = -EINVAL;

Expand Down Expand Up @@ -193,7 +193,7 @@ static int drx_load_fw(struct drx397xD_state *s, fw_ix_t ix)
static int write_fw(struct drx397xD_state *s, blob_ix_t ix)
{
struct i2c_msg msg = {.addr = s->config.demod_address,.flags = 0 };
u8 *data;
const u8 *data;
int len, rc = 0, i = 0;

if (ix < 0 || ix >= ARRAY_SIZE(blob_name)) {
Expand All @@ -214,7 +214,7 @@ static int write_fw(struct drx397xD_state *s, blob_ix_t ix)
case 0: /* bytecode */
len = data[i++];
msg.len = len;
msg.buf = &data[i];
msg.buf = (__u8 *) &data[i];
if (i2c_transfer(s->i2c, &msg, 1) != 1) {
rc = -EIO;
goto exit_rc;
Expand Down

0 comments on commit e272ae0

Please sign in to comment.