diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-02 10:26:03 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-07-02 10:26:03 -0300 |
commit | fa157792a54335fad458fd24f6e9cbfa810ee9ca (patch) | |
tree | 9d3b4318e4e766963baf0a949856439c30a47d34 /linux/drivers/media/video/cx88/cx88-vp3054-i2c.c | |
parent | 10e384975bebb47df8288097f7c75b59b573dd43 (diff) | |
parent | 8a50e9a266bb50a040473fe27c579175b8251b5f (diff) | |
download | mediapointer-dvb-s2-fa157792a54335fad458fd24f6e9cbfa810ee9ca.tar.gz mediapointer-dvb-s2-fa157792a54335fad458fd24f6e9cbfa810ee9ca.tar.bz2 |
merge: http://linuxtv.org/hg/~mkrufky/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 | 16 |
1 files changed, 5 insertions, 11 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..47b3b3d28 100644 --- a/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-vp3054-i2c.c @@ -98,7 +98,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 +109,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 +123,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 +135,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; |