Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 76727
b: refs/heads/master
c: a57ed8a
h: refs/heads/master
i:
  76725: 3f88257
  76723: 2477a49
  76719: 4af0acd
v: v3
  • Loading branch information
Steven Toth authored and Mauro Carvalho Chehab committed Jan 25, 2008
1 parent a032527 commit 2ca502d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 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: 7b8880140ff6aec6a5bec7929b03ce0b96a7c79a
refs/heads/master: a57ed8a1f7381aa7e1bec6c55d5f119706f2982d
12 changes: 10 additions & 2 deletions trunk/drivers/media/dvb/frontends/s5h1409.c
Original file line number Diff line number Diff line change
Expand Up @@ -750,6 +750,7 @@ struct dvb_frontend* s5h1409_attach(const struct s5h1409_config* config,
struct i2c_adapter* i2c)
{
struct s5h1409_state* state = NULL;
u16 reg;

/* allocate memory for the internal state */
state = kmalloc(sizeof(struct s5h1409_state), GFP_KERNEL);
Expand All @@ -763,16 +764,23 @@ struct dvb_frontend* s5h1409_attach(const struct s5h1409_config* config,
state->if_freq = S5H1409_VSB_IF_FREQ;

/* check if the demod exists */
if (s5h1409_readreg(state, 0x04) != 0x0066)
reg = s5h1409_readreg(state, 0x04);
if ((reg != 0x0066) && (reg != 0x007f))
goto error;

/* create dvb_frontend */
memcpy(&state->frontend.ops, &s5h1409_ops,
sizeof(struct dvb_frontend_ops));
state->frontend.demodulator_priv = state;

if (s5h1409_init(&state->frontend) != 0) {
printk(KERN_ERR "%s: Failed to initialize correctly\n",
__FUNCTION__);
goto error;
}

/* Note: Leaving the I2C gate open here. */
s5h1409_writereg(state, 0xf3, 1);
s5h1409_i2c_gate_ctrl(&state->frontend, 1);

return &state->frontend;

Expand Down

0 comments on commit 2ca502d

Please sign in to comment.