Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 98503
b: refs/heads/master
c: c9fa2b1
h: refs/heads/master
i:
  98501: 62a50c3
  98499: 3826e7e
  98495: 597b196
v: v3
  • Loading branch information
Oliver Endriss authored and Mauro Carvalho Chehab committed Jun 26, 2008
1 parent 304ced3 commit 1374266
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ad907fa39517ca35b46912fbfe2b77cd89e1d56a
refs/heads/master: c9fa2b1eee9d10c2455d3cd148cf13b34d91bdef
20 changes: 12 additions & 8 deletions trunk/drivers/media/dvb/frontends/tda10023.c
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,12 @@ static u8 tda10023_readreg (struct tda10023_state* state, u8 reg)
int ret;

ret = i2c_transfer (state->i2c, msg, 2);
if (ret != 2)
printk("DVB: TDA10023: %s: readreg error (ret == %i)\n",
__func__, ret);
if (ret != 2) {
int num = state->frontend.dvb ? state->frontend.dvb->num : -1;
printk(KERN_ERR "DVB: TDA10023(%d): %s: readreg error "
"(reg == 0x%02x, ret == %i)\n",
num, __func__, reg, ret);
}
return b1[0];
}

Expand All @@ -129,11 +132,12 @@ static int tda10023_writereg (struct tda10023_state* state, u8 reg, u8 data)
int ret;

ret = i2c_transfer (state->i2c, &msg, 1);
if (ret != 1)
printk("DVB: TDA10023(%d): %s, writereg error "
if (ret != 1) {
int num = state->frontend.dvb ? state->frontend.dvb->num : -1;
printk(KERN_ERR "DVB: TDA10023(%d): %s, writereg error "
"(reg == 0x%02x, val == 0x%02x, ret == %i)\n",
state->frontend.dvb->num, __func__, reg, data, ret);

num, __func__, reg, data, ret);
}
return (ret != 1) ? -EREMOTEIO : 0;
}

Expand Down Expand Up @@ -464,7 +468,7 @@ struct dvb_frontend* tda10023_attach(const struct tda1002x_config* config,
int i;

/* allocate memory for the internal state */
state = kmalloc(sizeof(struct tda10023_state), GFP_KERNEL);
state = kzalloc(sizeof(struct tda10023_state), GFP_KERNEL);
if (state == NULL) goto error;

/* setup the state */
Expand Down

0 comments on commit 1374266

Please sign in to comment.