diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-02 16:55:02 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-02 16:55:02 -0300 |
commit | 24b1cf4ab4be6bebbdc0c76a2ad7d25a39ce7d3f (patch) | |
tree | b326863f704290d43c8861f13bd773f9cca798d6 /linux/drivers/media/video/cx88/cx88-vp3054-i2c.c | |
parent | d531e1dbeb7dad87f971e1d651c925b11e99b9cb (diff) | |
parent | b08432f588a4161f12dd8419a2673ba582c9d3ab (diff) | |
download | mediapointer-dvb-s2-24b1cf4ab4be6bebbdc0c76a2ad7d25a39ce7d3f.tar.gz mediapointer-dvb-s2-24b1cf4ab4be6bebbdc0c76a2ad7d25a39ce7d3f.tar.bz2 |
merge: http://www.linuxtv.org/hg/~tmerle/v4l-dvb
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media/video/cx88/cx88-vp3054-i2c.c')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-vp3054-i2c.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c index dc97f4686..9b28ae688 100644 --- a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c @@ -28,7 +28,6 @@ #include <asm/io.h> -#include "compat.h" #include "cx88.h" #include "cx88-vp3054-i2c.h" @@ -98,7 +97,7 @@ static int vp3054_bit_getsda(void *data) /* ----------------------------------------------------------------------- */ -static struct i2c_algo_bit_data vp3054_i2c_algo_template = { +static const struct i2c_algo_bit_data vp3054_i2c_algo_template = { .setsda = vp3054_bit_setsda, .setscl = vp3054_bit_setscl, .getsda = vp3054_bit_getsda, @@ -109,14 +108,6 @@ static struct i2c_algo_bit_data vp3054_i2c_algo_template = { /* ----------------------------------------------------------------------- */ -static struct i2c_adapter vp3054_i2c_adap_template = { - .name = "cx2388x", -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) - .owner = THIS_MODULE, -#endif - .id = I2C_HW_B_CX2388x, -}; - int vp3054_i2c_probe(struct cx8802_dev *dev) { struct cx88_core *core = dev->core; @@ -131,8 +122,6 @@ int vp3054_i2c_probe(struct cx8802_dev *dev) return -ENOMEM; vp3054_i2c = dev->card_priv; - memcpy(&vp3054_i2c->adap, &vp3054_i2c_adap_template, - sizeof(vp3054_i2c->adap)); memcpy(&vp3054_i2c->algo, &vp3054_i2c_algo_template, sizeof(vp3054_i2c->algo)); @@ -145,6 +134,10 @@ int vp3054_i2c_probe(struct cx8802_dev *dev) #endif strlcpy(vp3054_i2c->adap.name, core->name, sizeof(vp3054_i2c->adap.name)); +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) + vp3054_i2c->adap.owner = THIS_MODULE; +#endif + vp3054_i2c->adap.id = I2C_HW_B_CX2388x; vp3054_i2c->algo.data = dev; i2c_set_adapdata(&vp3054_i2c->adap, dev); vp3054_i2c->adap.algo_data = &vp3054_i2c->algo; |