Commit b601d9a5 authored by Mauro Carvalho Chehab's avatar Mauro Carvalho Chehab

[media] as102: Move ancillary routines to the beggining

Avoid having function prototypes by moving some
ancillary routines to the beginning of the file.

No functional changes.
Signed-off-by: default avatarMauro Carvalho Chehab <m.chehab@samsung.com>
parent d8eb070b
...@@ -216,7 +216,17 @@ int as102_dvb_register(struct as102_dev_t *as102_dev) ...@@ -216,7 +216,17 @@ int as102_dvb_register(struct as102_dev_t *as102_dev)
goto edmxdinit; 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) { if (ret < 0) {
dev_err(dev, "%s: as102_dvb_register_frontend() failed: %d", dev_err(dev, "%s: as102_dvb_register_frontend() failed: %d",
__func__, ret); __func__, ret);
...@@ -252,7 +262,10 @@ int as102_dvb_register(struct as102_dev_t *as102_dev) ...@@ -252,7 +262,10 @@ int as102_dvb_register(struct as102_dev_t *as102_dev)
void as102_dvb_unregister(struct as102_dev_t *as102_dev) void as102_dvb_unregister(struct as102_dev_t *as102_dev)
{ {
/* unregister as102 frontend */ /* 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 */ /* unregister demux device */
dvb_dmxdev_release(&as102_dev->dvb_dmxdev); dvb_dmxdev_release(&as102_dev->dvb_dmxdev);
......
...@@ -60,17 +60,10 @@ struct as102_dev_t { ...@@ -60,17 +60,10 @@ struct as102_dev_t {
uint8_t elna_cfg; uint8_t elna_cfg;
struct dvb_adapter dvb_adap; struct dvb_adapter dvb_adap;
struct dvb_frontend dvb_fe; struct dvb_frontend *dvb_fe;
struct dvb_demux dvb_dmx; struct dvb_demux dvb_dmx;
struct dmxdev dvb_dmxdev; 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 */ /* timer handle to trig ts stream download */
struct timer_list timer_handle; struct timer_list timer_handle;
...@@ -84,5 +77,7 @@ struct as102_dev_t { ...@@ -84,5 +77,7 @@ struct as102_dev_t {
int as102_dvb_register(struct as102_dev_t *dev); int as102_dvb_register(struct as102_dev_t *dev);
void as102_dvb_unregister(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); /* FIXME: move it to a separate header */
int as102_dvb_unregister_fe(struct dvb_frontend *dev); struct dvb_frontend *as102_attach(const char *name,
struct as10x_bus_adapter_t *bus_adap,
uint8_t elna_cfg);
This diff is collapsed.
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