[media] af9035: remove one config parameter
authorAntti Palosaari <crope@iki.fi>
Mon, 7 May 2012 17:59:55 +0000 (14:59 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Mon, 14 May 2012 16:20:44 +0000 (13:20 -0300)
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>
drivers/media/dvb/dvb-usb/af9035.c
drivers/media/dvb/dvb-usb/af9035.h

index d2c84ee290a8fc936416283b13021bdb4ba4128c..d97f45e39f4f38a10dc7e6574fa8cdeb09a1d7a8 100644 (file)
@@ -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;
        }
index 262cc3f4b0089db2edd54780856df3eaebe7520e..481a1a43dd2a65909ad9846f4b9332aa95f98bb4 100644 (file)
@@ -54,7 +54,6 @@ struct usb_req {
 
 struct state {
        bool dual_mode;
-       bool hw_not_supported;
 
        struct af9033_config af9033_config[2];
 };