[media] dvb_usb_v2: remove num_frontends_initialized from dvb_usb_adapter
authorAntti Palosaari <crope@iki.fi>
Fri, 15 Jun 2012 23:46:44 +0000 (20:46 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Sat, 4 Aug 2012 10:56:34 +0000 (07:56 -0300)
We can live easily without that variable.

Signed-off-by: Antti Palosaari <crope@iki.fi>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/dvb/dvb-usb/dvb_usb.h
drivers/media/dvb/dvb-usb/dvb_usb_dvb.c

index 98504b59b1027f6f068b0bd4f8de2bc624e0cc79..6392fd3d416478f3c44c3ff9853b373debd5d120 100644 (file)
@@ -288,7 +288,6 @@ struct dvb_usb_adapter {
        int (*fe_sleep[MAX_NO_OF_FE_PER_ADAP]) (struct dvb_frontend *);
 
        int active_fe;
-       int num_frontends_initialized;
 };
 
 /**
index d436a1582022638fa6bdd8e44c18d67c188fd343..bc94874039e81adff6e0bcf35e964eba5ba2db16 100644 (file)
@@ -386,8 +386,6 @@ int dvb_usbv2_adapter_frontend_init(struct dvb_usb_adapter *adap)
                }
        }
 
-       adap->num_frontends_initialized = count_registered;
-
        return 0;
 
 err_dvb_unregister_frontend:
@@ -410,14 +408,12 @@ int dvb_usbv2_adapter_frontend_exit(struct dvb_usb_adapter *adap)
        int i;
        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]) {
                        dvb_unregister_frontend(adap->fe[i]);
                        dvb_frontend_detach(adap->fe[i]);
                }
        }
 
-       adap->num_frontends_initialized = 0;
-
        return 0;
 }