* RFC [PATCH 2.6] I2C: w83627ehf: add fan_div no-op store method
@ 2005-05-19 6:25 Grant Coady
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Grant Coady
0 siblings, 2 replies; 3+ messages in thread
From: Grant Coady @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
Hi Greg, Jean,
This small patch adds no-op fan_div store method to silence warning
from 'sensors -s'. Compile tested.
--Grant.
Signed-off-by: Grant Coady <gcoady@gmail.com>
---
w83627ehf.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
--- linux-2.6.12-rc4-mm1/drivers/i2c/chips/w83627ehf.c 2005-05-12 21:33:22.000000000 +1000
+++ linux-2.6.12-rc4-mm1b/drivers/i2c/chips/w83627ehf.c 2005-05-13 19:39:00.000000000 +1000
@@ -515,8 +515,15 @@ show_reg_fan##offset##_div(struct device
{ \
return show_fan_div(dev, buf, offset - 1); \
} \
-static DEVICE_ATTR(fan##offset##_div, S_IRUGO, \
- show_reg_fan##offset##_div, NULL);
+static ssize_t \
+store_reg_fan##offset##_div(struct device *dev, const char *buf, \
+ size_t count) \
+{ \
+ return count; \
+} \
+static DEVICE_ATTR(fan##offset##_div, S_IRUGO | S_IWUSR, \
+ show_reg_fan##offset##_div, \
+ store_reg_fan##offset##_div);
sysfs_fan_offset(1);
sysfs_fan_min_offset(1);
^ permalink raw reply [flat|nested] 3+ messages in thread* RFC [PATCH 2.6] I2C: w83627ehf: add fan_div no-op store method
2005-05-19 6:25 RFC [PATCH 2.6] I2C: w83627ehf: add fan_div no-op store method Grant Coady
@ 2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Grant Coady
1 sibling, 0 replies; 3+ messages in thread
From: Jean Delvare @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
Hi Grant,
> This small patch adds no-op fan_div store method to silence warning
> from 'sensors -s'. Compile tested.
No, sorry.
For one thing I do not want 2.6 drivers to be crippled with compatibility
tricks when we can easily move the tricks to user-space, as I explained
earlier.
For another... The w83627ehf driver does not exist before Linux 2.6. The
official version which will be included in 2.6.13 is the only one we
have to support, and it has the auto fan div functionality. So there is
absolutely no reason why a user would ever try to set the clock divider
manually. The fanN_div features are clearly tagged read-only in
libsensors, and the default configuration file doesn't attempt to set
them, so everything is consistent already. So what exactly were you
trying to fix in the first place please?
--
Jean Delvare
^ permalink raw reply [flat|nested] 3+ messages in thread
* RFC [PATCH 2.6] I2C: w83627ehf: add fan_div no-op store method
2005-05-19 6:25 RFC [PATCH 2.6] I2C: w83627ehf: add fan_div no-op store method Grant Coady
2005-05-19 6:25 ` Jean Delvare
@ 2005-05-19 6:25 ` Grant Coady
1 sibling, 0 replies; 3+ messages in thread
From: Grant Coady @ 2005-05-19 6:25 UTC (permalink / raw)
To: lm-sensors
Hi,
On Fri, 13 May 2005 12:04:23 +0200 (CEST), "Jean Delvare" <khali@linux-fr.org> wrote:
No worries, apologies for noise
--Grant.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-05-19 6:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-19 6:25 RFC [PATCH 2.6] I2C: w83627ehf: add fan_div no-op store method Grant Coady
2005-05-19 6:25 ` Jean Delvare
2005-05-19 6:25 ` Grant Coady
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.