diff options
author | Andreas Oberritter <devnull@localhost> | 2003-10-08 23:12:46 +0000 |
---|---|---|
committer | Andreas Oberritter <devnull@localhost> | 2003-10-08 23:12:46 +0000 |
commit | 211cbd901aa45d1e325986fb9709ea774c4f29f7 (patch) | |
tree | ca4aabb2420f9555202e568f17d05b2016557d66 /linux/drivers/media/dvb/frontends/ves1820.c | |
parent | 20bef24e32fbba770db1a3f6f2481745ea25603e (diff) | |
download | mediapointer-dvb-s2-211cbd901aa45d1e325986fb9709ea774c4f29f7.tar.gz mediapointer-dvb-s2-211cbd901aa45d1e325986fb9709ea774c4f29f7.tar.bz2 |
- allow private data to be associated with i2c devices
- fixed some return values in i2c device attach functions
Diffstat (limited to 'linux/drivers/media/dvb/frontends/ves1820.c')
-rw-r--r-- | linux/drivers/media/dvb/frontends/ves1820.c | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/linux/drivers/media/dvb/frontends/ves1820.c b/linux/drivers/media/dvb/frontends/ves1820.c index ac1ca02fd..bd31d1457 100644 --- a/linux/drivers/media/dvb/frontends/ves1820.c +++ b/linux/drivers/media/dvb/frontends/ves1820.c @@ -507,9 +507,9 @@ static long probe_demod_addr (struct dvb_i2c_bus *i2c) } -static int ves1820_attach (struct dvb_i2c_bus *i2c) +static int ves1820_attach (struct dvb_i2c_bus *i2c, void **data) { - void *data = NULL; + void *priv = NULL; long demod_addr; long tuner_type; @@ -522,21 +522,19 @@ static int ves1820_attach (struct dvb_i2c_bus *i2c) if ((i2c->adapter->num < MAX_UNITS) && pwm[i2c->adapter->num] != -1) { printk("DVB: VES1820(%d): pwm=0x%02x (user specified)\n", i2c->adapter->num, pwm[i2c->adapter->num]); - SET_PWM(data, pwm[i2c->adapter->num]); + SET_PWM(priv, pwm[i2c->adapter->num]); } else - SET_PWM(data, read_pwm(i2c)); - SET_REG0(data, ves1820_inittab[0]); - SET_TUNER(data, tuner_type); - SET_DEMOD_ADDR(data, demod_addr); + SET_PWM(priv, read_pwm(i2c)); + SET_REG0(priv, ves1820_inittab[0]); + SET_TUNER(priv, tuner_type); + SET_DEMOD_ADDR(priv, demod_addr); - dvb_register_frontend (ves1820_ioctl, i2c, data, &ves1820_info); - - return 0; + return dvb_register_frontend (ves1820_ioctl, i2c, priv, &ves1820_info); } -static void ves1820_detach (struct dvb_i2c_bus *i2c) +static void ves1820_detach (struct dvb_i2c_bus *i2c, void *data) { dvb_unregister_frontend (ves1820_ioctl, i2c); } |