Skip to content

Commit

Permalink
[media] af9035: remove one config parameter
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Antti Palosaari authored and Mauro Carvalho Chehab committed May 14, 2012
1 parent 2a79eef commit 1cbabf9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
4 changes: 2 additions & 2 deletions drivers/media/dvb/dvb-usb/af9035.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
};
Expand Down Expand Up @@ -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;
}
Expand Down
1 change: 0 additions & 1 deletion drivers/media/dvb/dvb-usb/af9035.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ struct usb_req {

struct state {
bool dual_mode;
bool hw_not_supported;

struct af9033_config af9033_config[2];
};
Expand Down

0 comments on commit 1cbabf9

Please sign in to comment.