diff options
Diffstat (limited to 'linux/drivers/media/video/vp27smpx.c')
-rw-r--r-- | linux/drivers/media/video/vp27smpx.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/linux/drivers/media/video/vp27smpx.c b/linux/drivers/media/video/vp27smpx.c index 28f0cd162..25a69c7f5 100644 --- a/linux/drivers/media/video/vp27smpx.c +++ b/linux/drivers/media/video/vp27smpx.c @@ -144,8 +144,9 @@ static int vp27smpx_probe(struct i2c_client *client, if (!i2c_check_functionality(client->adapter, I2C_FUNC_SMBUS_BYTE_DATA)) return -EIO; +#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 26) snprintf(client->name, sizeof(client->name) - 1, "vp27smpx"); - +#endif v4l_info(client, "chip found @ 0x%x (%s)\n", client->addr << 1, client->adapter->name); @@ -168,6 +169,14 @@ static int vp27smpx_remove(struct i2c_client *client) /* ----------------------------------------------------------------------- */ +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) +static const struct i2c_device_id vp27smpx_id[] = { + { "vp27smpx", 0 }, + { } +}; +MODULE_DEVICE_TABLE(i2c, vp27smpx_id); +#endif + static struct v4l2_i2c_driver_data v4l2_i2c_data = { .name = "vp27smpx", .driverid = I2C_DRIVERID_VP27SMPX, @@ -177,6 +186,9 @@ static struct v4l2_i2c_driver_data v4l2_i2c_data = { #ifndef I2C_CLASS_TV_ANALOG .legacy_id = I2C_HW_B_CX2341X, #endif +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 26) + .id_table = vp27smpx_id, +#endif }; #if LINUX_VERSION_CODE < KERNEL_VERSION(2, 5, 0) |