aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/em28xx/em28xx-dvb.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/em28xx/em28xx-dvb.c')
-rw-r--r--drivers/media/video/em28xx/em28xx-dvb.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/media/video/em28xx/em28xx-dvb.c b/drivers/media/video/em28xx/em28xx-dvb.c
index 2e9ec626b609..7df81575b7f2 100644
--- a/drivers/media/video/em28xx/em28xx-dvb.c
+++ b/drivers/media/video/em28xx/em28xx-dvb.c
@@ -201,6 +201,18 @@ static int stop_feed(struct dvb_demux_feed *feed)
201} 201}
202 202
203 203
204
205/* ------------------------------------------------------------------ */
206static int em28xx_dvb_bus_ctrl(struct dvb_frontend *fe, int acquire)
207{
208 struct em28xx *dev = fe->dvb->priv;
209
210 if (acquire)
211 return em28xx_set_mode(dev, EM28XX_DIGITAL_MODE);
212 else
213 return em28xx_set_mode(dev, EM28XX_MODE_UNDEFINED);
214}
215
204/* ------------------------------------------------------------------ */ 216/* ------------------------------------------------------------------ */
205 217
206static struct lgdt330x_config em2880_lgdt3303_dev = { 218static struct lgdt330x_config em2880_lgdt3303_dev = {
@@ -268,6 +280,10 @@ int register_dvb(struct em28xx_dvb *dvb,
268 dev->name, result); 280 dev->name, result);
269 goto fail_adapter; 281 goto fail_adapter;
270 } 282 }
283
284 /* Ensure all frontends negotiate bus access */
285 dvb->frontend->ops.ts_bus_ctrl = em28xx_dvb_bus_ctrl;
286
271 dvb->adapter.priv = dev; 287 dvb->adapter.priv = dev;
272 288
273 /* register frontend */ 289 /* register frontend */
@@ -287,6 +303,7 @@ int register_dvb(struct em28xx_dvb *dvb,
287 dvb->demux.feednum = 256; 303 dvb->demux.feednum = 256;
288 dvb->demux.start_feed = start_feed; 304 dvb->demux.start_feed = start_feed;
289 dvb->demux.stop_feed = stop_feed; 305 dvb->demux.stop_feed = stop_feed;
306
290 result = dvb_dmx_init(&dvb->demux); 307 result = dvb_dmx_init(&dvb->demux);
291 if (result < 0) { 308 if (result < 0) {
292 printk(KERN_WARNING "%s: dvb_dmx_init failed (errno = %d)\n", 309 printk(KERN_WARNING "%s: dvb_dmx_init failed (errno = %d)\n",