diff options
Diffstat (limited to 'linux/include/media/v4l2-i2c-drv-legacy.h')
-rw-r--r-- | linux/include/media/v4l2-i2c-drv-legacy.h | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/linux/include/media/v4l2-i2c-drv-legacy.h b/linux/include/media/v4l2-i2c-drv-legacy.h index 738f87454..31d6e103c 100644 --- a/linux/include/media/v4l2-i2c-drv-legacy.h +++ b/linux/include/media/v4l2-i2c-drv-legacy.h @@ -77,19 +77,11 @@ static int v4l2_i2c_drv_detach_legacy(struct i2c_client *client) return 0; } -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,14) #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) static int v4l2_i2c_drv_suspend_helper(struct i2c_client *client, pm_message_t state) #else static int v4l2_i2c_drv_suspend_helper(struct device * dev, pm_message_t state) #endif -#else -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,13) -static int v4l2_i2c_drv_suspend_helper(struct device * dev, pm_message_t state, u32 level) -#else -static int v4l2_i2c_drv_suspend_helper(struct device * dev, u32 state, u32 level) -#endif -#endif { #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20) struct i2c_client *client = container_of(dev, struct i2c_client, dev); @@ -97,15 +89,11 @@ static int v4l2_i2c_drv_suspend_helper(struct device * dev, u32 state, u32 level return v4l2_i2c_data.suspend ? v4l2_i2c_data.suspend(client, state) : 0; } -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,14) #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) static int v4l2_i2c_drv_resume_helper(struct i2c_client *client) #else static int v4l2_i2c_drv_resume_helper(struct device * dev) #endif -#else -static int v4l2_i2c_drv_resume_helper(struct device * dev, u32 level) -#endif { #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20) struct i2c_client *client = container_of(dev, struct i2c_client, dev); @@ -117,16 +105,8 @@ static int v4l2_i2c_drv_resume_helper(struct device * dev, u32 level) /* i2c implementation */ static struct i2c_driver v4l2_i2c_driver_legacy = { -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) - .owner = THIS_MODULE, -#endif -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) - .flags = I2C_DF_NOTIFY, -#endif .driver = { -#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) .owner = THIS_MODULE, -#endif #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,20) .suspend = v4l2_i2c_drv_suspend_helper, .resume = v4l2_i2c_drv_resume_helper, @@ -166,11 +146,7 @@ static int __init v4l2_i2c_drv_init(void) if (v4l2_i2c_data.legacy_class == 0) v4l2_i2c_data.legacy_class = I2C_CLASS_TV_ANALOG; -#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) - strlcpy(v4l2_i2c_driver_legacy.name, v4l2_i2c_drv_name_legacy, sizeof(v4l2_i2c_driver_legacy.name)); -#else v4l2_i2c_driver_legacy.driver.name = v4l2_i2c_drv_name_legacy; -#endif v4l2_i2c_driver_legacy.id = v4l2_i2c_data.driverid; v4l2_i2c_driver_legacy.command = v4l2_i2c_data.command; err = i2c_add_driver(&v4l2_i2c_driver_legacy); |