From e50f58c7fa5d1681e75dbfe820f70d4703130464 Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Thu, 17 Apr 2008 18:37:53 -0300 Subject: em28xx: share the same xc3028 setup for analog and digital modes From: Mauro Carvalho Chehab Thanks to Devin Heitmueller and Aidan Thornton" for pointing some errors with the previous scenario. Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/em28xx/em28xx-dvb.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'linux/drivers/media/video/em28xx/em28xx-dvb.c') diff --git a/linux/drivers/media/video/em28xx/em28xx-dvb.c b/linux/drivers/media/video/em28xx/em28xx-dvb.c index 0372dc07c..cdebd5bd4 100644 --- a/linux/drivers/media/video/em28xx/em28xx-dvb.c +++ b/linux/drivers/media/video/em28xx/em28xx-dvb.c @@ -21,8 +21,6 @@ #include #include "lgdt330x.h" -#include "tuner-xc2028.h" -#include "tuner-xc2028-types.h" MODULE_DESCRIPTION("driver for em28xx based DVB cards"); MODULE_AUTHOR("Mauro Carvalho Chehab "); @@ -70,12 +68,15 @@ static int attach_xc3028(u8 addr, struct em28xx *dev) { struct dvb_frontend *fe; struct xc2028_ctrl ctl; - struct xc2028_config cfg = { - .i2c_adap = &dev->i2c_adap, - .i2c_addr = addr, - .ctrl = &ctl, - .callback = em28xx_tuner_callback, - }; + struct xc2028_config cfg; + + memset (&cfg, 0, sizeof(cfg)); + cfg.i2c_adap = &dev->i2c_adap; + cfg.i2c_addr = addr; + cfg.ctrl = &ctl; + cfg.callback = em28xx_tuner_callback; + + em28xx_setup_xc3028(dev, &ctl); if (!dev->dvb.frontend) { printk(KERN_ERR "%s/2: dvb frontend not attached. " -- cgit v1.2.3