Skip to content

Commit

Permalink
[media] dvb_usb_v2: remove num_frontends_initialized from dvb_usb_ada…
Browse files Browse the repository at this point in the history
…pter

We can live easily without that variable.

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 Aug 4, 2012
1 parent 6dca4ea commit dd5e52c
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
1 change: 0 additions & 1 deletion drivers/media/dvb/dvb-usb/dvb_usb.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
};

/**
Expand Down
6 changes: 1 addition & 5 deletions drivers/media/dvb/dvb-usb/dvb_usb_dvb.c
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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;
}

0 comments on commit dd5e52c

Please sign in to comment.