Skip to content

Commit

Permalink
V4L/DVB (4468): Another fix for attaching the DiB3000MC
Browse files Browse the repository at this point in the history
Another stupid fix for attaching the DiB3000MC. == 0 instead of != 0.

Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
Patrick Boettcher authored and Mauro Carvalho Chehab committed Sep 26, 2006
1 parent 4e66c97 commit 0f69e7f
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions drivers/media/dvb/dvb-usb/dibusb-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -230,19 +230,16 @@ static struct dib3000mc_config mod3000p_dib3000p_config = {

int dibusb_dib3000mc_frontend_attach(struct dvb_usb_device *d)
{
int ret;
if ((ret = dib3000mc_attach(&d->i2c_adap, 1, DEFAULT_DIB3000P_I2C_ADDRESS, 0, &mod3000p_dib3000p_config, &d->fe)) != 0)
return ret;

if ((ret = dib3000mc_attach(&d->i2c_adap, 1, DEFAULT_DIB3000MC_I2C_ADDRESS, 0, &mod3000p_dib3000p_config, &d->fe)) != 0)
return ret;

if (d->priv != NULL) {
struct dibusb_state *st = d->priv;
st->ops.pid_parse = dib3000mc_pid_parse;
st->ops.pid_ctrl = dib3000mc_pid_control;
if (dib3000mc_attach(&d->i2c_adap, 1, DEFAULT_DIB3000P_I2C_ADDRESS, 0, &mod3000p_dib3000p_config, &d->fe) == 0 ||
dib3000mc_attach(&d->i2c_adap, 1, DEFAULT_DIB3000MC_I2C_ADDRESS, 0, &mod3000p_dib3000p_config, &d->fe) == 0) {
if (d->priv != NULL) {
struct dibusb_state *st = d->priv;
st->ops.pid_parse = dib3000mc_pid_parse;
st->ops.pid_ctrl = dib3000mc_pid_control;
}
return 0;
}
return 0;
return -ENODEV;
}
EXPORT_SYMBOL(dibusb_dib3000mc_frontend_attach);

Expand Down

0 comments on commit 0f69e7f

Please sign in to comment.