Skip to content

Commit

Permalink
[media] as102: Move ancillary routines to the beggining
Browse files Browse the repository at this point in the history
Avoid having function prototypes by moving some
ancillary routines to the beginning of the file.

No functional changes.

Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
  • Loading branch information
Mauro Carvalho Chehab committed Aug 21, 2014
1 parent d8eb070 commit b601d9a
Show file tree
Hide file tree
Showing 3 changed files with 274 additions and 300 deletions.
17 changes: 15 additions & 2 deletions drivers/media/usb/as102/as102_drv.c
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,17 @@ int as102_dvb_register(struct as102_dev_t *as102_dev)
goto edmxdinit;
}

ret = as102_dvb_register_fe(as102_dev, &as102_dev->dvb_fe);
/* Attach the frontend */
as102_dev->dvb_fe = dvb_attach(as102_attach, as102_dev->name,
&as102_dev->bus_adap,
as102_dev->elna_cfg);
if (!as102_dev->dvb_fe) {
dev_err(dev, "%s: as102_attach() failed: %d",
__func__, ret);
goto efereg;
}

ret = dvb_register_frontend(&as102_dev->dvb_adap, as102_dev->dvb_fe);
if (ret < 0) {
dev_err(dev, "%s: as102_dvb_register_frontend() failed: %d",
__func__, ret);
Expand Down Expand Up @@ -252,7 +262,10 @@ int as102_dvb_register(struct as102_dev_t *as102_dev)
void as102_dvb_unregister(struct as102_dev_t *as102_dev)
{
/* unregister as102 frontend */
as102_dvb_unregister_fe(&as102_dev->dvb_fe);
dvb_unregister_frontend(as102_dev->dvb_fe);

/* detach frontend */
dvb_frontend_detach(as102_dev->dvb_fe);

/* unregister demux device */
dvb_dmxdev_release(&as102_dev->dvb_dmxdev);
Expand Down
15 changes: 5 additions & 10 deletions drivers/media/usb/as102/as102_drv.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,17 +60,10 @@ struct as102_dev_t {
uint8_t elna_cfg;

struct dvb_adapter dvb_adap;
struct dvb_frontend dvb_fe;
struct dvb_frontend *dvb_fe;
struct dvb_demux dvb_dmx;
struct dmxdev dvb_dmxdev;

/* demodulator stats */
struct as10x_demod_stats demod_stats;
/* signal strength */
uint16_t signal_strength;
/* bit error rate */
uint32_t ber;

/* timer handle to trig ts stream download */
struct timer_list timer_handle;

Expand All @@ -84,5 +77,7 @@ struct as102_dev_t {
int as102_dvb_register(struct as102_dev_t *dev);
void as102_dvb_unregister(struct as102_dev_t *dev);

int as102_dvb_register_fe(struct as102_dev_t *dev, struct dvb_frontend *fe);
int as102_dvb_unregister_fe(struct dvb_frontend *dev);
/* FIXME: move it to a separate header */
struct dvb_frontend *as102_attach(const char *name,
struct as10x_bus_adapter_t *bus_adap,
uint8_t elna_cfg);
Loading

0 comments on commit b601d9a

Please sign in to comment.