diff options
Diffstat (limited to 'linux/include/media/v4l2-i2c-drv.h')
-rw-r--r-- | linux/include/media/v4l2-i2c-drv.h | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/linux/include/media/v4l2-i2c-drv.h b/linux/include/media/v4l2-i2c-drv.h index f74c8a64a..9333e56b3 100644 --- a/linux/include/media/v4l2-i2c-drv.h +++ b/linux/include/media/v4l2-i2c-drv.h @@ -111,19 +111,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); @@ -131,15 +123,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); @@ -150,16 +138,8 @@ static int v4l2_i2c_drv_resume_helper(struct device * dev, u32 level) /* ----------------------------------------------------------------------- */ static struct i2c_driver v4l2_i2c_driver = { -#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, @@ -180,11 +160,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.name, v4l2_i2c_data.name, sizeof(v4l2_i2c_driver.name)); -#else v4l2_i2c_driver.driver.name = v4l2_i2c_data.name; -#endif v4l2_i2c_driver.id = v4l2_i2c_data.driverid; v4l2_i2c_driver.command = v4l2_i2c_data.command; return i2c_add_driver(&v4l2_i2c_driver); |