* [BK PATCH] More i2c driver fixes for 2.6.0-test7 @ 2003-10-15 18:04 Greg KH 2003-10-15 18:05 ` [PATCH] " Greg KH 0 siblings, 1 reply; 6+ messages in thread From: Greg KH @ 2003-10-15 18:04 UTC (permalink / raw) To: torvalds; +Cc: linux-kernel, sensors Hi, Here are some more minor i2c driver fixes for 2.6.0-test7. They fix some bugs in the w83781d.c driver, and remove some unneeded MOD_INC and MOD_DEC calls (which fixes some compiler warnings.) Please pull from: bk://kernel.bkbits.net/gregkh/linux/i2c-2.6 thanks, greg k-h ------ Greg Kroah-Hartman: o I2C: fix more define problems in w83781d driver o I2C: remove unneeded MOD_INC and MOD_DEC calls Luca Tettamanti: o I2C: sensors/w83781d.c creates useless sysfs entries ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] More i2c driver fixes for 2.6.0-test7 2003-10-15 18:04 [BK PATCH] More i2c driver fixes for 2.6.0-test7 Greg KH @ 2003-10-15 18:05 ` Greg KH 2003-10-15 18:05 ` Greg KH 0 siblings, 1 reply; 6+ messages in thread From: Greg KH @ 2003-10-15 18:05 UTC (permalink / raw) To: linux-kernel, sensors ChangeSet 1.1347.1.1, 2003/10/13 11:28:27-07:00, greg@kroah.com [PATCH] I2C: remove unneeded MOD_INC and MOD_DEC calls. drivers/i2c/algos/i2c-algo-ite.c | 7 ------- 1 files changed, 7 deletions(-) diff -Nru a/drivers/i2c/algos/i2c-algo-ite.c b/drivers/i2c/algos/i2c-algo-ite.c --- a/drivers/i2c/algos/i2c-algo-ite.c Wed Oct 15 10:58:15 2003 +++ b/drivers/i2c/algos/i2c-algo-ite.c Wed Oct 15 10:58:15 2003 @@ -779,10 +779,6 @@ adap->retries = 3; /* be replaced by defines */ adap->flags = 0; -#ifdef MODULE - MOD_INC_USE_COUNT; -#endif - i2c_add_adapter(adap); iic_init(iic_adap); @@ -815,9 +811,6 @@ return res; DEB2(printk("i2c-algo-ite: adapter unregistered: %s\n",adap->name)); -#ifdef MODULE - MOD_DEC_USE_COUNT; -#endif return 0; } ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] More i2c driver fixes for 2.6.0-test7 2003-10-15 18:05 ` [PATCH] " Greg KH @ 2003-10-15 18:05 ` Greg KH 2003-10-15 18:05 ` Greg KH 2003-10-15 19:13 ` Sam Ravnborg 0 siblings, 2 replies; 6+ messages in thread From: Greg KH @ 2003-10-15 18:05 UTC (permalink / raw) To: linux-kernel, sensors ChangeSet 1.1347.1.2, 2003/10/13 12:31:27-07:00, kronos@kronoz.cjb.net [PATCH] I2C: sensors/w83781d.c creates useless sysfs entries Jindrich Makovicka <makovick@kmlinux.fjfi.cvut.cz> ha scritto: > here is a trivial fix for Winbond sensor driver, which currently creates > useless entries in sys/bus/i2c due to missing braces after if statements > - author probably forgot about the macro expansion. IMHO it's better to fix the macro: drivers/i2c/chips/w83781d.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletion(-) diff -Nru a/drivers/i2c/chips/w83781d.c b/drivers/i2c/chips/w83781d.c --- a/drivers/i2c/chips/w83781d.c Wed Oct 15 10:57:59 2003 +++ b/drivers/i2c/chips/w83781d.c Wed Oct 15 10:57:59 2003 @@ -422,9 +422,11 @@ sysfs_in_offsets(8); #define device_create_file_in(client, offset) \ +do { \ device_create_file(&client->dev, &dev_attr_in_input##offset); \ device_create_file(&client->dev, &dev_attr_in_min##offset); \ -device_create_file(&client->dev, &dev_attr_in_max##offset); +device_create_file(&client->dev, &dev_attr_in_max##offset); \ +} while (0); #define show_fan_reg(reg) \ static ssize_t show_##reg (struct device *dev, char *buf, int nr) \ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] More i2c driver fixes for 2.6.0-test7 2003-10-15 18:05 ` Greg KH @ 2003-10-15 18:05 ` Greg KH 2003-10-15 19:14 ` Sam Ravnborg 2003-10-15 19:13 ` Sam Ravnborg 1 sibling, 1 reply; 6+ messages in thread From: Greg KH @ 2003-10-15 18:05 UTC (permalink / raw) To: linux-kernel, sensors ChangeSet 1.1347.1.3, 2003/10/14 13:30:34-07:00, greg@kroah.com [PATCH] I2C: fix more define problems in w83781d driver drivers/i2c/chips/w83781d.c | 22 +++++++++++++++++++--- 1 files changed, 19 insertions(+), 3 deletions(-) diff -Nru a/drivers/i2c/chips/w83781d.c b/drivers/i2c/chips/w83781d.c --- a/drivers/i2c/chips/w83781d.c Wed Oct 15 10:57:42 2003 +++ b/drivers/i2c/chips/w83781d.c Wed Oct 15 10:57:42 2003 @@ -426,7 +426,7 @@ device_create_file(&client->dev, &dev_attr_in_input##offset); \ device_create_file(&client->dev, &dev_attr_in_min##offset); \ device_create_file(&client->dev, &dev_attr_in_max##offset); \ -} while (0); +} while (0) #define show_fan_reg(reg) \ static ssize_t show_##reg (struct device *dev, char *buf, int nr) \ @@ -484,8 +484,10 @@ sysfs_fan_min_offset(3); #define device_create_file_fan(client, offset) \ +do { \ device_create_file(&client->dev, &dev_attr_fan_input##offset); \ device_create_file(&client->dev, &dev_attr_fan_min##offset); \ +} while (0) #define show_temp_reg(reg) \ static ssize_t show_##reg (struct device *dev, char *buf, int nr) \ @@ -568,9 +570,11 @@ sysfs_temp_offsets(3); #define device_create_file_temp(client, offset) \ +do { \ device_create_file(&client->dev, &dev_attr_temp_input##offset); \ device_create_file(&client->dev, &dev_attr_temp_max##offset); \ -device_create_file(&client->dev, &dev_attr_temp_min##offset); +device_create_file(&client->dev, &dev_attr_temp_min##offset); \ +} while (0) static ssize_t show_vid_reg(struct device *dev, char *buf) @@ -693,8 +697,10 @@ sysfs_beep(MASK, mask); #define device_create_file_beep(client) \ +do { \ device_create_file(&client->dev, &dev_attr_beep_enable); \ -device_create_file(&client->dev, &dev_attr_beep_mask); +device_create_file(&client->dev, &dev_attr_beep_mask); \ +} while (0) /* w83697hf only has two fans */ static ssize_t @@ -771,7 +777,9 @@ sysfs_fan_div(3); #define device_create_file_fan_div(client, offset) \ +do { \ device_create_file(&client->dev, &dev_attr_fan_div##offset); \ +} while (0) /* w83697hf only has two fans */ static ssize_t @@ -883,10 +891,14 @@ sysfs_pwm(4); #define device_create_file_pwm(client, offset) \ +do { \ device_create_file(&client->dev, &dev_attr_pwm##offset); \ +} while (0) #define device_create_file_pwmenable(client, offset) \ +do { \ device_create_file(&client->dev, &dev_attr_pwm_enable##offset); \ +} while (0) static ssize_t show_sensor_reg(struct device *dev, char *buf, int nr) @@ -959,7 +971,9 @@ sysfs_sensor(3); #define device_create_file_sensor(client, offset) \ +do { \ device_create_file(&client->dev, &dev_attr_sensor##offset); \ +} while (0) #ifdef W83781D_RT static ssize_t @@ -1018,7 +1032,9 @@ sysfs_rt(3); #define device_create_file_rt(client, offset) \ +do { \ device_create_file(&client->dev, &dev_attr_rt##offset); \ +} while (0) #endif /* ifdef W83781D_RT */ ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] More i2c driver fixes for 2.6.0-test7 2003-10-15 18:05 ` Greg KH @ 2003-10-15 19:14 ` Sam Ravnborg 0 siblings, 0 replies; 6+ messages in thread From: Sam Ravnborg @ 2003-10-15 19:14 UTC (permalink / raw) To: Greg KH; +Cc: linux-kernel, sensors On Wed, Oct 15, 2003 at 11:05:48AM -0700, Greg KH wrote: > device_create_file(&client->dev, &dev_attr_in_max##offset); \ > -} while (0); > +} while (0) Next time I better read all patches before replying - sorry for the noise. Sam ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] More i2c driver fixes for 2.6.0-test7 2003-10-15 18:05 ` Greg KH 2003-10-15 18:05 ` Greg KH @ 2003-10-15 19:13 ` Sam Ravnborg 1 sibling, 0 replies; 6+ messages in thread From: Sam Ravnborg @ 2003-10-15 19:13 UTC (permalink / raw) To: Greg KH; +Cc: linux-kernel, sensors On Wed, Oct 15, 2003 at 11:05:47AM -0700, Greg KH wrote: > -device_create_file(&client->dev, &dev_attr_in_max##offset); > +device_create_file(&client->dev, &dev_attr_in_max##offset); \ > +} while (0); ^ Did you really want to have that ';' there? It is harmless in current usage, but it may be confusing. Sam ^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2003-10-15 19:14 UTC | newest] Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2003-10-15 18:04 [BK PATCH] More i2c driver fixes for 2.6.0-test7 Greg KH 2003-10-15 18:05 ` [PATCH] " Greg KH 2003-10-15 18:05 ` Greg KH 2003-10-15 18:05 ` Greg KH 2003-10-15 19:14 ` Sam Ravnborg 2003-10-15 19:13 ` Sam Ravnborg
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®