From 891b1a330d34434953b744f5b470acf01cbcd1df Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Sat, 7 Jan 2006 20:43:22 +0000 Subject: Some cleanups at I2C modules - Latest patch reverted, since __stringfy seems to be needed for kernel < 2.6.15 - Applied kernel I2C cleanups from Jean Delaware. - driver names simplified to allow usage of newer printk macros at v4l2-common.h Signed-off-by: Mauro Carvalho Chehab --- linux/drivers/media/video/tda9887.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) (limited to 'linux/drivers/media/video/tda9887.c') diff --git a/linux/drivers/media/video/tda9887.c b/linux/drivers/media/video/tda9887.c index 5125ce1ad..ce31ad9fd 100644 --- a/linux/drivers/media/video/tda9887.c +++ b/linux/drivers/media/video/tda9887.c @@ -934,17 +934,22 @@ static int tda9887_resume(struct device * dev, u32 level) /* ----------------------------------------------------------------------- */ static struct i2c_driver driver = { -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,54) +#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0))&&(LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15)) .owner = THIS_MODULE, #endif - .name = "i2c tda9887 driver", - .id = -1, /* FIXME */ +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) + .name = "tda9887", .flags = I2C_DF_NOTIFY, +#endif + .id = -1, /* FIXME */ .attach_adapter = tda9887_probe, .detach_client = tda9887_detach, .command = tda9887_command, -#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) +#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,0) .driver = { +#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,15) + .name = "tda9887", +#endif .suspend = tda9887_suspend, .resume = tda9887_resume, }, @@ -953,7 +958,9 @@ static struct i2c_driver driver = { static struct i2c_client client_template = { .name = "tda9887", +#if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) .flags = I2C_CLIENT_ALLOW_USE, +#endif .driver = &driver, }; -- cgit v1.2.3