From 8a9947552d43b0d20d5fa23ac0ba435d526be454 Mon Sep 17 00:00:00 2001 From: Jean Delvare Date: Sat, 26 Nov 2005 20:28:06 +0100 Subject: [PATCH] i2c: Drop i2c_driver.flags, 2 of 3 Just about every i2c chip driver sets the I2C_DF_NOTIFY flag, so we can simply make it the default and drop the flag. If any driver really doesn't want to be notified when i2c adapters are added, that driver can simply omit to set .attach_adapter. This approach is also more robust as it prevents accidental NULL pointer dereferences. Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman --- drivers/media/video/tuner-3036.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/media/video/tuner-3036.c') diff --git a/drivers/media/video/tuner-3036.c b/drivers/media/video/tuner-3036.c index 79203595b9c..3505cec2e65 100644 --- a/drivers/media/video/tuner-3036.c +++ b/drivers/media/video/tuner-3036.c @@ -178,7 +178,6 @@ i2c_driver_tuner = .owner = THIS_MODULE, .name = "sab3036", .id = I2C_DRIVERID_SAB3036, - .flags = I2C_DF_NOTIFY, .attach_adapter = tuner_probe, .detach_client = tuner_detach, .command = tuner_command -- cgit v1.2.3 From 604f28e2b8d34cbaf08f0351374645f161335a82 Mon Sep 17 00:00:00 2001 From: Laurent Riffard Date: Sat, 26 Nov 2005 20:43:39 +0100 Subject: [PATCH] i2c: Drop i2c_driver.{owner,name}, 5 of 11 We should use the i2c_driver.driver's .name and .owner fields instead of the i2c_driver's ones. This patch updates the drivers/media/video and usb/media drivers. Signed-off-by: Laurent Riffard Signed-off-by: Jean Delvare Signed-off-by: Greg Kroah-Hartman --- drivers/media/video/tuner-3036.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'drivers/media/video/tuner-3036.c') diff --git a/drivers/media/video/tuner-3036.c b/drivers/media/video/tuner-3036.c index 3505cec2e65..83257af8db4 100644 --- a/drivers/media/video/tuner-3036.c +++ b/drivers/media/video/tuner-3036.c @@ -175,8 +175,10 @@ tuner_probe(struct i2c_adapter *adap) static struct i2c_driver i2c_driver_tuner = { - .owner = THIS_MODULE, - .name = "sab3036", + .driver = { + .owner = THIS_MODULE, + .name = "sab3036", + }, .id = I2C_DRIVERID_SAB3036, .attach_adapter = tuner_probe, .detach_client = tuner_detach, -- cgit v1.2.3 From 2b48716d1d2f2edb1e7cbc5ecf1cb2cb39373e33 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 6 Dec 2005 15:33:15 -0800 Subject: [PATCH] I2C: Remove .owner setting from i2c_driver as it's no longer needed Now that i2c_add_driver() doesn't need the module owner to be set by hand, we can delete it from the drivers. This patch catches all of the drivers that I found in the current tree (if a driver sets the .owner by hand, it's not a problem, just not needed.) Signed-off-by: Greg Kroah-Hartman Cc: Jean Delvare --- drivers/media/video/tuner-3036.c | 1 - 1 file changed, 1 deletion(-) (limited to 'drivers/media/video/tuner-3036.c') diff --git a/drivers/media/video/tuner-3036.c b/drivers/media/video/tuner-3036.c index 83257af8db4..d97f66804c3 100644 --- a/drivers/media/video/tuner-3036.c +++ b/drivers/media/video/tuner-3036.c @@ -176,7 +176,6 @@ static struct i2c_driver i2c_driver_tuner = { .driver = { - .owner = THIS_MODULE, .name = "sab3036", }, .id = I2C_DRIVERID_SAB3036, -- cgit v1.2.3