summaryrefslogtreecommitdiffstats
path: root/drivers/media/dvb
diff options
context:
space:
mode:
authorAntti Palosaari <crope@iki.fi>2012-05-07 14:59:55 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-05-14 13:20:44 -0300
commit1cbabf9c751f8795a35885fad9ceaec7de71a29e (patch)
tree0f350fbfb3171c5e04931322b253aae3279795cc /drivers/media/dvb
parent2a79eefa82d010b64b36efeebec04397ad494f22 (diff)
downloadlinux-1cbabf9c751f8795a35885fad9ceaec7de71a29e.tar.gz
linux-1cbabf9c751f8795a35885fad9ceaec7de71a29e.tar.xz
linux-1cbabf9c751f8795a35885fad9ceaec7de71a29e.zip
[media] af9035: remove one config parameter
We can use tuner ID instead of HW not supported flag. Lesser code is better code. Signed-off-by: Antti Palosaari <crope@iki.fi> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/dvb')
-rw-r--r--drivers/media/dvb/dvb-usb/af9035.c4
-rw-r--r--drivers/media/dvb/dvb-usb/af9035.h1
2 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/dvb/dvb-usb/af9035.c b/drivers/media/dvb/dvb-usb/af9035.c
index d2c84ee290a8..d97f45e39f4f 100644
--- a/drivers/media/dvb/dvb-usb/af9035.c
+++ b/drivers/media/dvb/dvb-usb/af9035.c
@@ -615,7 +615,6 @@ static int af9035_read_mac_address(struct dvb_usb_device *d, u8 mac[6])
state->af9033_config[i].spec_inv = 1;
break;
default:
- state->hw_not_supported = true;
warn("tuner ID=%02x not supported, please report!",
tmp);
};
@@ -809,7 +808,8 @@ static int af9035_frontend_attach(struct dvb_usb_adapter *adap)
struct state *state = adap->dev->priv;
int ret;
- if (state->hw_not_supported) {
+ if (!state->af9033_config[adap->id].tuner) {
+ /* unsupported tuner */
ret = -ENODEV;
goto err;
}
diff --git a/drivers/media/dvb/dvb-usb/af9035.h b/drivers/media/dvb/dvb-usb/af9035.h
index 262cc3f4b008..481a1a43dd2a 100644
--- a/drivers/media/dvb/dvb-usb/af9035.h
+++ b/drivers/media/dvb/dvb-usb/af9035.h
@@ -54,7 +54,6 @@ struct usb_req {
struct state {
bool dual_mode;
- bool hw_not_supported;
struct af9033_config af9033_config[2];
};