diff options
Diffstat (limited to 'linux/include/media/v4l2-i2c-drv.h')
-rw-r--r-- | linux/include/media/v4l2-i2c-drv.h | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/linux/include/media/v4l2-i2c-drv.h b/linux/include/media/v4l2-i2c-drv.h index 73d713f07..86b575200 100644 --- a/linux/include/media/v4l2-i2c-drv.h +++ b/linux/include/media/v4l2-i2c-drv.h @@ -83,12 +83,7 @@ static struct i2c_client_address_data addr_data; /* Bus-based I2C API is not present, add legacy code */ -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) static int v4l2_i2c_drv_attach_legacy(struct i2c_adapter *adapter, int address, int kind) -#else -static int v4l2_i2c_drv_attach_legacy(struct i2c_adapter *adapter, int address, - unsigned short flags, int kind) -#endif { return v4l2_i2c_attach(adapter, address, &v4l2_i2c_driver, v4l2_i2c_data.name, v4l2_i2c_data.probe); @@ -121,14 +116,9 @@ static int v4l2_i2c_drv_detach_legacy(struct i2c_client *client) if (err) return err; kfree(client); - -#if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) - MOD_DEC_USE_COUNT; -#endif return 0; } -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,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) @@ -164,18 +154,16 @@ static int v4l2_i2c_drv_resume_helper(struct device * dev, u32 level) #endif return v4l2_i2c_data.resume ? v4l2_i2c_data.resume(client) : 0; } -#endif /* ----------------------------------------------------------------------- */ static struct i2c_driver v4l2_i2c_driver = { -#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0)) && (LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) +#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 -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) .driver = { #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) .owner = THIS_MODULE, @@ -185,7 +173,6 @@ static struct i2c_driver v4l2_i2c_driver = { .resume = v4l2_i2c_drv_resume_helper, #endif }, -#endif .attach_adapter = v4l2_i2c_drv_probe_legacy, .detach_client = v4l2_i2c_drv_detach_legacy, #if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,20) |