diff options
author | Mauro Carvalho Chehab <devnull@localhost> | 2006-01-08 12:05:34 +0000 |
---|---|---|
committer | Mauro Carvalho Chehab <devnull@localhost> | 2006-01-08 12:05:34 +0000 |
commit | 73c5fb6887d21bdbe4c5aec07f132e0010a554da (patch) | |
tree | 29aed676055bf337c38c7be489cb544df9fe9c1e /linux/drivers/media/video/wm8775.c | |
parent | 1dcaf3c6fe06fdbc838908e5b109d9c9aa510835 (diff) | |
download | mediapointer-dvb-s2-73c5fb6887d21bdbe4c5aec07f132e0010a554da.tar.gz mediapointer-dvb-s2-73c5fb6887d21bdbe4c5aec07f132e0010a554da.tar.bz2 |
i2c fixes and cleanups
- Miscelaneous i2c cleanups and fixes to work with kernel >2.6.15
- linux/sound/pci/bt87x.c updated to kernel version.
kernel-sync
Signed-off-by: Mauro Carvalho Chehab <mchehab@brturbo.com.br>
Diffstat (limited to 'linux/drivers/media/video/wm8775.c')
-rw-r--r-- | linux/drivers/media/video/wm8775.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/linux/drivers/media/video/wm8775.c b/linux/drivers/media/video/wm8775.c index 30e5ce058..4fa692129 100644 --- a/linux/drivers/media/video/wm8775.c +++ b/linux/drivers/media/video/wm8775.c @@ -187,7 +187,9 @@ static int wm8775_attach(struct i2c_adapter *adapter, int address, client->addr = address; client->adapter = adapter; client->driver = &i2c_driver; +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) client->flags = I2C_CLIENT_ALLOW_USE; +#endif snprintf(client->name, sizeof(client->name) - 1, "wm8775"); v4l_info(client, "chip found @ 0x%x (%s)\n", address << 1, adapter->name); @@ -258,17 +260,21 @@ static int wm8775_detach(struct i2c_client *client) /* i2c implementation */ static struct i2c_driver i2c_driver = { +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) + .owner = THIS_MODULE, +#endif +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .name = "wm8775", - - .id = I2C_DRIVERID_WM8775, .flags = I2C_DF_NOTIFY, - - .attach_adapter = wm8775_probe, - .detach_client = wm8775_detach, - .command = wm8775_command, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) - .owner = THIS_MODULE, +#else + .driver = { + .name = "wm8775", + }, #endif + .id = I2C_DRIVERID_WM8775, + .attach_adapter = wm8775_probe, + .detach_client = wm8775_detach, + .command = wm8775_command, }; #if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,0) |