summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2012-09-17 15:49:54 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-09-27 15:14:12 -0300
commit97efe7811be6634d6b520a9cdd9f723369af9216 (patch)
tree6b635a0b9cf593baa51f723cdf6d97dda5f6c066
parent4005c1a9f6c40b0b0de2b8ac80a6f53f23b52f6e (diff)
downloadlinux-97efe7811be6634d6b520a9cdd9f723369af9216.tar.gz
linux-97efe7811be6634d6b520a9cdd9f723369af9216.tar.bz2
linux-97efe7811be6634d6b520a9cdd9f723369af9216.zip
[media] rtl28xxu: do not return error for unimplemented fe callback
Use of frontend callback is highly hardware design dependent and whole callback could be optional in many cases. Returning error by default when callback is not implemented is stupid. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/usb/dvb-usb-v2/rtl28xxu.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
index 3b98ad4cd0a6..757abee4c2cc 100644
--- a/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
+++ b/drivers/media/usb/dvb-usb-v2/rtl28xxu.c
@@ -591,7 +591,6 @@ static int rtl2832u_fc0012_tuner_callback(struct dvb_usb_device *d,
goto err;
}
return 0;
-
err:
dev_dbg(&d->udev->dev, "%s: failed=%d\n", __func__, ret);
return ret;
@@ -643,7 +642,6 @@ static int rtl2832u_tua9001_tuner_callback(struct dvb_usb_device *d,
}
return 0;
-
err:
dev_dbg(&d->udev->dev, "%s: failed=%d\n", __func__, ret);
return ret;
@@ -656,17 +654,15 @@ static int rtl2832u_tuner_callback(struct dvb_usb_device *d, int cmd, int arg)
switch (priv->tuner) {
case TUNER_RTL2832_FC0012:
return rtl2832u_fc0012_tuner_callback(d, cmd, arg);
-
case TUNER_RTL2832_FC0013:
return rtl2832u_fc0013_tuner_callback(d, cmd, arg);
-
case TUNER_RTL2832_TUA9001:
return rtl2832u_tua9001_tuner_callback(d, cmd, arg);
default:
break;
}
- return -ENODEV;
+ return 0;
}
static int rtl2832u_frontend_callback(void *adapter_priv, int component,
@@ -682,7 +678,7 @@ static int rtl2832u_frontend_callback(void *adapter_priv, int component,
break;
}
- return -EINVAL;
+ return 0;
}
static int rtl2832u_frontend_attach(struct dvb_usb_adapter *adap)