Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[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>

authored by

Antti Palosaari and committed by
Mauro Carvalho Chehab
1cbabf9c 2a79eefa

+2 -3
+2 -2
drivers/media/dvb/dvb-usb/af9035.c
··· 615 615 state->af9033_config[i].spec_inv = 1; 616 616 break; 617 617 default: 618 - state->hw_not_supported = true; 619 618 warn("tuner ID=%02x not supported, please report!", 620 619 tmp); 621 620 }; ··· 808 809 struct state *state = adap->dev->priv; 809 810 int ret; 810 811 811 - if (state->hw_not_supported) { 812 + if (!state->af9033_config[adap->id].tuner) { 813 + /* unsupported tuner */ 812 814 ret = -ENODEV; 813 815 goto err; 814 816 }
-1
drivers/media/dvb/dvb-usb/af9035.h
··· 54 54 55 55 struct state { 56 56 bool dual_mode; 57 - bool hw_not_supported; 58 57 59 58 struct af9033_config af9033_config[2]; 60 59 };