Commit dd5e52cd authored by Antti Palosaari's avatar Antti Palosaari Committed by Mauro Carvalho Chehab

[media] dvb_usb_v2: remove num_frontends_initialized from dvb_usb_adapter

We can live easily without that variable.
Signed-off-by: default avatarAntti Palosaari <crope@iki.fi>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 6dca4ea3
...@@ -288,7 +288,6 @@ struct dvb_usb_adapter { ...@@ -288,7 +288,6 @@ struct dvb_usb_adapter {
int (*fe_sleep[MAX_NO_OF_FE_PER_ADAP]) (struct dvb_frontend *); int (*fe_sleep[MAX_NO_OF_FE_PER_ADAP]) (struct dvb_frontend *);
int active_fe; int active_fe;
int num_frontends_initialized;
}; };
/** /**
......
...@@ -386,8 +386,6 @@ int dvb_usbv2_adapter_frontend_init(struct dvb_usb_adapter *adap) ...@@ -386,8 +386,6 @@ int dvb_usbv2_adapter_frontend_init(struct dvb_usb_adapter *adap)
} }
} }
adap->num_frontends_initialized = count_registered;
return 0; return 0;
err_dvb_unregister_frontend: err_dvb_unregister_frontend:
...@@ -410,14 +408,12 @@ int dvb_usbv2_adapter_frontend_exit(struct dvb_usb_adapter *adap) ...@@ -410,14 +408,12 @@ int dvb_usbv2_adapter_frontend_exit(struct dvb_usb_adapter *adap)
int i; int i;
pr_debug("%s: adap=%d\n", __func__, adap->id); pr_debug("%s: adap=%d\n", __func__, adap->id);
for (i = adap->num_frontends_initialized - 1; i >= 0; i--) { for (i = MAX_NO_OF_FE_PER_ADAP - 1; i >= 0; i--) {
if (adap->fe[i]) { if (adap->fe[i]) {
dvb_unregister_frontend(adap->fe[i]); dvb_unregister_frontend(adap->fe[i]);
dvb_frontend_detach(adap->fe[i]); dvb_frontend_detach(adap->fe[i]);
} }
} }
adap->num_frontends_initialized = 0;
return 0; return 0;
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment