summaryrefslogtreecommitdiff
path: root/linux/drivers/media/dvb/dvb-usb/dibusb-common.c
diff options
context:
space:
mode:
authorPatrick Boettcher <pb@linuxtv.org>2006-08-03 11:04:16 +0200
committerPatrick Boettcher <pb@linuxtv.org>2006-08-03 11:04:16 +0200
commite387412c0ad4e033e240cdaf43dd4fc4c16e1245 (patch)
treed113a179adfa42e56548ee795ac5fef78900d73f /linux/drivers/media/dvb/dvb-usb/dibusb-common.c
parentb5d24e3fdbcb2224e74af148395d4cca2b094384 (diff)
downloadmediapointer-dvb-s2-e387412c0ad4e033e240cdaf43dd4fc4c16e1245.tar.gz
mediapointer-dvb-s2-e387412c0ad4e033e240cdaf43dd4fc4c16e1245.tar.bz2
Another fix for attaching the DiB3000MC
From: Patrick Boettcher <pb@linuxtv.org> Another stupid fix for attaching the DiB3000MC. == 0 instead of != 0. Signed-off-by: Patrick Boettcher <pb@linuxtv.org>
Diffstat (limited to 'linux/drivers/media/dvb/dvb-usb/dibusb-common.c')
-rw-r--r--linux/drivers/media/dvb/dvb-usb/dibusb-common.c21
1 files changed, 9 insertions, 12 deletions
diff --git a/linux/drivers/media/dvb/dvb-usb/dibusb-common.c b/linux/drivers/media/dvb/dvb-usb/dibusb-common.c
index 6723c153e..ead1f7a4d 100644
--- a/linux/drivers/media/dvb/dvb-usb/dibusb-common.c
+++ b/linux/drivers/media/dvb/dvb-usb/dibusb-common.c
@@ -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);