diff options
author | Gerd Knorr <devnull@localhost> | 2004-09-10 08:50:22 +0000 |
---|---|---|
committer | Gerd Knorr <devnull@localhost> | 2004-09-10 08:50:22 +0000 |
commit | 029761494c912196c295e73b767d7b8206945e1c (patch) | |
tree | 1122fa827687fb8bbc0cd88b3a86750fcde8c33d /linux/drivers/media/video/cx88 | |
parent | 1f28b60566ae6df05bee4dc8b2c5517fadaee79a (diff) | |
download | mediapointer-dvb-s2-029761494c912196c295e73b767d7b8206945e1c.tar.gz mediapointer-dvb-s2-029761494c912196c295e73b767d7b8206945e1c.tar.bz2 |
- cx88: i2c fixups.
Diffstat (limited to 'linux/drivers/media/video/cx88')
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-blackbird.c | 4 | ||||
-rw-r--r-- | linux/drivers/media/video/cx88/cx88-i2c.c | 29 |
2 files changed, 8 insertions, 25 deletions
diff --git a/linux/drivers/media/video/cx88/cx88-blackbird.c b/linux/drivers/media/video/cx88/cx88-blackbird.c index e7093b465..bc14f84f1 100644 --- a/linux/drivers/media/video/cx88/cx88-blackbird.c +++ b/linux/drivers/media/video/cx88/cx88-blackbird.c @@ -1,5 +1,5 @@ /* - * $Id: cx88-blackbird.c,v 1.8 2004/09/09 14:00:24 kraxel Exp $ + * $Id: cx88-blackbird.c,v 1.9 2004/09/10 08:50:22 kraxel Exp $ * * Support for a cx23416 mpeg encoder via cx2388x host port. * "blackbird" reference design. @@ -363,7 +363,7 @@ static int blackbird_load_firmware(struct cx8802_dev *dev) } if (firmware->size != BLACKBIRD_FIRM_IMAGE_SIZE) { - dprintk(0, "ERROR: Firmware size mismatch (have %ld, expected %d)\n", + dprintk(0, "ERROR: Firmware size mismatch (have %d, expected %d)\n", firmware->size, BLACKBIRD_FIRM_IMAGE_SIZE); return -1; } diff --git a/linux/drivers/media/video/cx88/cx88-i2c.c b/linux/drivers/media/video/cx88/cx88-i2c.c index ef04a431d..1292a1644 100644 --- a/linux/drivers/media/video/cx88/cx88-i2c.c +++ b/linux/drivers/media/video/cx88/cx88-i2c.c @@ -88,18 +88,6 @@ static int cx8800_bit_getsda(void *data) /* ----------------------------------------------------------------------- */ -#ifndef I2C_PEC -static void cx8800_inc_use(struct i2c_adapter *adap) -{ - MOD_INC_USE_COUNT; -} - -static void cx8800_dec_use(struct i2c_adapter *adap) -{ - MOD_DEC_USE_COUNT; -} -#endif - static int attach_inform(struct i2c_client *client) { struct cx88_core *core = i2c_get_adapdata(client->adapter); @@ -161,16 +149,8 @@ static struct i2c_algo_bit_data cx8800_i2c_algo_template = { /* ----------------------------------------------------------------------- */ static struct i2c_adapter cx8800_i2c_adap_template = { -#ifdef I2C_PEC - .owner = THIS_MODULE, -#else - .inc_use = cx8800_inc_use, - .dec_use = cx8800_dec_use, -#endif -#ifdef I2C_CLASS_TV_ANALOG - .class = I2C_CLASS_TV_ANALOG, -#endif I2C_DEVNAME("cx2388x"), + .owner = THIS_MODULE, .id = I2C_HW_B_BT848, .client_register = attach_inform, .client_unregister = detach_inform, @@ -191,9 +171,12 @@ int cx88_i2c_init(struct cx88_core *core, struct pci_dev *pci) memcpy(&core->i2c_client, &cx8800_i2c_client_template, sizeof(core->i2c_client)); -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,54) + if (core->tuner_type != UNSET) + core->i2c_adap.class |= I2C_CLASS_TV_ANALOG; + if (cx88_boards[core->board].dvb) + core->i2c_adap.class |= I2C_CLASS_TV_DIGITAL; + core->i2c_adap.dev.parent = &pci->dev; -#endif strlcpy(core->i2c_adap.name,core->name,sizeof(core->i2c_adap.name)); core->i2c_algo.data = core; i2c_set_adapdata(&core->i2c_adap,core); |