Commit 83244025 authored by Devin Heitmueller's avatar Devin Heitmueller Committed by Mauro Carvalho Chehab

V4L/DVB (7608): em28xx-dvb: Some cleanups and fixes

em28xx-dvb.c:
 - Remove unneeded xc3028_ctrl structure.  The driver automatically preserves
   the previous value

tuner-xc2028.c:
 - Make the return type for xc2028_get_reg signed, since all of the callers
   are looking for "< 0" to detect errors.
Signed-off-by: default avatarDevin Heitmueller <devin.heitmueller@gmail.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@infradead.org>
parent 6ea54d93
...@@ -214,17 +214,13 @@ static struct zl10353_config em28xx_zl10353_with_xc3028 = { ...@@ -214,17 +214,13 @@ static struct zl10353_config em28xx_zl10353_with_xc3028 = {
static int attach_xc3028(u8 addr, struct em28xx *dev) static int attach_xc3028(u8 addr, struct em28xx *dev)
{ {
struct dvb_frontend *fe; struct dvb_frontend *fe;
struct xc2028_ctrl ctl;
struct xc2028_config cfg; struct xc2028_config cfg;
memset(&cfg, 0, sizeof(cfg)); memset(&cfg, 0, sizeof(cfg));
cfg.i2c_adap = &dev->i2c_adap; cfg.i2c_adap = &dev->i2c_adap;
cfg.i2c_addr = addr; cfg.i2c_addr = addr;
cfg.ctrl = &ctl;
cfg.callback = em28xx_tuner_callback; cfg.callback = em28xx_tuner_callback;
em28xx_setup_xc3028(dev, &ctl);
if (!dev->dvb->frontend) { if (!dev->dvb->frontend) {
printk(KERN_ERR "%s/2: dvb frontend not attached. " printk(KERN_ERR "%s/2: dvb frontend not attached. "
"Can't attach xc3028\n", "Can't attach xc3028\n",
......
...@@ -130,7 +130,7 @@ struct xc2028_data { ...@@ -130,7 +130,7 @@ struct xc2028_data {
_rc; \ _rc; \
}) })
static unsigned int xc2028_get_reg(struct xc2028_data *priv, u16 reg, u16 *val) static int xc2028_get_reg(struct xc2028_data *priv, u16 reg, u16 *val)
{ {
unsigned char buf[2]; unsigned char buf[2];
unsigned char ibuf[2]; unsigned char ibuf[2];
......
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