* [lm-sensors] [PATCH] hwmon: VRM is not read from registers
@ 2007-10-08 16:24 Jean Delvare
2007-10-08 19:06 ` Hans de Goede
2007-10-09 0:48 ` Mark M. Hoffman
0 siblings, 2 replies; 3+ messages in thread
From: Jean Delvare @ 2007-10-08 16:24 UTC (permalink / raw)
To: lm-sensors
The VRM value is not read from chip registers, so there's no need
to update the device data cache before exporting the VRM value to
user-space.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
---
drivers/hwmon/adm1025.c | 2 +-
drivers/hwmon/adm1026.c | 2 +-
drivers/hwmon/asb100.c | 2 +-
drivers/hwmon/it87.c | 2 +-
drivers/hwmon/lm85.c | 2 +-
drivers/hwmon/lm87.c | 2 +-
drivers/hwmon/pc87360.c | 2 +-
drivers/hwmon/smsc47m192.c | 2 +-
drivers/hwmon/w83627hf.c | 2 +-
drivers/hwmon/w83781d.c | 2 +-
drivers/hwmon/w83791d.c | 2 +-
11 files changed, 11 insertions(+), 11 deletions(-)
--- linux-2.6.23-rc9.orig/drivers/hwmon/adm1025.c 2007-10-08 18:23:55.000000000 +0200
+++ linux-2.6.23-rc9/drivers/hwmon/adm1025.c 2007-10-08 18:23:57.000000000 +0200
@@ -292,7 +292,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
static ssize_t show_vrm(struct device *dev, struct device_attribute *attr, char *buf)
{
- struct adm1025_data *data = adm1025_update_device(dev);
+ struct adm1025_data *data = dev_get_drvdata(dev);
return sprintf(buf, "%u\n", data->vrm);
}
static ssize_t set_vrm(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
--- linux-2.6.23-rc9.orig/drivers/hwmon/adm1026.c 2007-10-08 18:23:55.000000000 +0200
+++ linux-2.6.23-rc9/drivers/hwmon/adm1026.c 2007-10-08 18:23:57.000000000 +0200
@@ -1221,7 +1221,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
static ssize_t show_vrm_reg(struct device *dev, struct device_attribute *attr, char *buf)
{
- struct adm1026_data *data = adm1026_update_device(dev);
+ struct adm1026_data *data = dev_get_drvdata(dev);
return sprintf(buf,"%d\n", data->vrm);
}
static ssize_t store_vrm_reg(struct device *dev, struct device_attribute *attr, const char *buf,
--- linux-2.6.23-rc9.orig/drivers/hwmon/asb100.c 2007-10-08 18:23:55.000000000 +0200
+++ linux-2.6.23-rc9/drivers/hwmon/asb100.c 2007-10-08 18:23:57.000000000 +0200
@@ -514,7 +514,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
/* VRM */
static ssize_t show_vrm(struct device *dev, struct device_attribute *attr, char *buf)
{
- struct asb100_data *data = asb100_update_device(dev);
+ struct asb100_data *data = dev_get_drvdata(dev);
return sprintf(buf, "%d\n", data->vrm);
}
--- linux-2.6.23-rc9.orig/drivers/hwmon/it87.c 2007-10-08 18:23:56.000000000 +0200
+++ linux-2.6.23-rc9/drivers/hwmon/it87.c 2007-10-08 18:23:57.000000000 +0200
@@ -765,7 +765,7 @@ static DEVICE_ATTR(alarms, S_IRUGO, show
static ssize_t
show_vrm_reg(struct device *dev, struct device_attribute *attr, char *buf)
{
- struct it87_data *data = it87_update_device(dev);
+ struct it87_data *data = dev_get_drvdata(dev);
return sprintf(buf, "%u\n", data->vrm);
}
static ssize_t
--- linux-2.6.23-rc9.orig/drivers/hwmon/lm85.c 2007-10-08 18:23:56.000000000 +0200
+++ linux-2.6.23-rc9/drivers/hwmon/lm85.c 2007-10-08 18:23:57.000000000 +0200
@@ -438,7 +438,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
static ssize_t show_vrm_reg(struct device *dev, struct device_attribute *attr, char *buf)
{
- struct lm85_data *data = lm85_update_device(dev);
+ struct lm85_data *data = dev_get_drvdata(dev);
return sprintf(buf, "%ld\n", (long) data->vrm);
}
--- linux-2.6.23-rc9.orig/drivers/hwmon/lm87.c 2007-10-08 18:23:57.000000000 +0200
+++ linux-2.6.23-rc9/drivers/hwmon/lm87.c 2007-10-08 18:23:57.000000000 +0200
@@ -501,7 +501,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
static ssize_t show_vrm(struct device *dev, struct device_attribute *attr, char *buf)
{
- struct lm87_data *data = lm87_update_device(dev);
+ struct lm87_data *data = dev_get_drvdata(dev);
return sprintf(buf, "%d\n", data->vrm);
}
static ssize_t set_vrm(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
--- linux-2.6.23-rc9.orig/drivers/hwmon/pc87360.c 2007-10-08 18:23:56.000000000 +0200
+++ linux-2.6.23-rc9/drivers/hwmon/pc87360.c 2007-10-08 18:23:57.000000000 +0200
@@ -500,7 +500,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
static ssize_t show_vrm(struct device *dev, struct device_attribute *attr, char *buf)
{
- struct pc87360_data *data = pc87360_update_device(dev);
+ struct pc87360_data *data = dev_get_drvdata(dev);
return sprintf(buf, "%u\n", data->vrm);
}
static ssize_t set_vrm(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
--- linux-2.6.23-rc9.orig/drivers/hwmon/smsc47m192.c 2007-10-08 18:23:56.000000000 +0200
+++ linux-2.6.23-rc9/drivers/hwmon/smsc47m192.c 2007-10-08 18:23:57.000000000 +0200
@@ -334,7 +334,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
static ssize_t show_vrm(struct device *dev, struct device_attribute *attr,
char *buf)
{
- struct smsc47m192_data *data = smsc47m192_update_device(dev);
+ struct smsc47m192_data *data = dev_get_drvdata(dev);
return sprintf(buf, "%d\n", data->vrm);
}
--- linux-2.6.23-rc9.orig/drivers/hwmon/w83627hf.c 2007-10-08 18:23:56.000000000 +0200
+++ linux-2.6.23-rc9/drivers/hwmon/w83627hf.c 2007-10-08 18:23:57.000000000 +0200
@@ -703,7 +703,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
static ssize_t
show_vrm_reg(struct device *dev, struct device_attribute *attr, char *buf)
{
- struct w83627hf_data *data = w83627hf_update_device(dev);
+ struct w83627hf_data *data = dev_get_drvdata(dev);
return sprintf(buf, "%ld\n", (long) data->vrm);
}
static ssize_t
--- linux-2.6.23-rc9.orig/drivers/hwmon/w83781d.c 2007-10-08 18:23:57.000000000 +0200
+++ linux-2.6.23-rc9/drivers/hwmon/w83781d.c 2007-10-08 18:23:57.000000000 +0200
@@ -453,7 +453,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
static ssize_t
show_vrm_reg(struct device *dev, struct device_attribute *attr, char *buf)
{
- struct w83781d_data *data = w83781d_update_device(dev);
+ struct w83781d_data *data = dev_get_drvdata(dev);
return sprintf(buf, "%ld\n", (long) data->vrm);
}
--- linux-2.6.23-rc9.orig/drivers/hwmon/w83791d.c 2007-10-08 18:23:56.000000000 +0200
+++ linux-2.6.23-rc9/drivers/hwmon/w83791d.c 2007-10-08 18:23:57.000000000 +0200
@@ -832,7 +832,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
static ssize_t show_vrm_reg(struct device *dev,
struct device_attribute *attr, char *buf)
{
- struct w83791d_data *data = w83791d_update_device(dev);
+ struct w83791d_data *data = dev_get_drvdata(dev);
return sprintf(buf, "%d\n", data->vrm);
}
--
Jean Delvare
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [lm-sensors] [PATCH] hwmon: VRM is not read from registers
2007-10-08 16:24 [lm-sensors] [PATCH] hwmon: VRM is not read from registers Jean Delvare
@ 2007-10-08 19:06 ` Hans de Goede
2007-10-09 0:48 ` Mark M. Hoffman
1 sibling, 0 replies; 3+ messages in thread
From: Hans de Goede @ 2007-10-08 19:06 UTC (permalink / raw)
To: lm-sensors
Jean Delvare wrote:
> The VRM value is not read from chip registers, so there's no need
> to update the device data cache before exporting the VRM value to
> user-space.
>
> Signed-off-by: Jean Delvare <khali@linux-fr.org>
Looks good,
Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Regards,
Hans
> ---
> drivers/hwmon/adm1025.c | 2 +-
> drivers/hwmon/adm1026.c | 2 +-
> drivers/hwmon/asb100.c | 2 +-
> drivers/hwmon/it87.c | 2 +-
> drivers/hwmon/lm85.c | 2 +-
> drivers/hwmon/lm87.c | 2 +-
> drivers/hwmon/pc87360.c | 2 +-
> drivers/hwmon/smsc47m192.c | 2 +-
> drivers/hwmon/w83627hf.c | 2 +-
> drivers/hwmon/w83781d.c | 2 +-
> drivers/hwmon/w83791d.c | 2 +-
> 11 files changed, 11 insertions(+), 11 deletions(-)
>
> --- linux-2.6.23-rc9.orig/drivers/hwmon/adm1025.c 2007-10-08 18:23:55.000000000 +0200
> +++ linux-2.6.23-rc9/drivers/hwmon/adm1025.c 2007-10-08 18:23:57.000000000 +0200
> @@ -292,7 +292,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
>
> static ssize_t show_vrm(struct device *dev, struct device_attribute *attr, char *buf)
> {
> - struct adm1025_data *data = adm1025_update_device(dev);
> + struct adm1025_data *data = dev_get_drvdata(dev);
> return sprintf(buf, "%u\n", data->vrm);
> }
> static ssize_t set_vrm(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
> --- linux-2.6.23-rc9.orig/drivers/hwmon/adm1026.c 2007-10-08 18:23:55.000000000 +0200
> +++ linux-2.6.23-rc9/drivers/hwmon/adm1026.c 2007-10-08 18:23:57.000000000 +0200
> @@ -1221,7 +1221,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
>
> static ssize_t show_vrm_reg(struct device *dev, struct device_attribute *attr, char *buf)
> {
> - struct adm1026_data *data = adm1026_update_device(dev);
> + struct adm1026_data *data = dev_get_drvdata(dev);
> return sprintf(buf,"%d\n", data->vrm);
> }
> static ssize_t store_vrm_reg(struct device *dev, struct device_attribute *attr, const char *buf,
> --- linux-2.6.23-rc9.orig/drivers/hwmon/asb100.c 2007-10-08 18:23:55.000000000 +0200
> +++ linux-2.6.23-rc9/drivers/hwmon/asb100.c 2007-10-08 18:23:57.000000000 +0200
> @@ -514,7 +514,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
> /* VRM */
> static ssize_t show_vrm(struct device *dev, struct device_attribute *attr, char *buf)
> {
> - struct asb100_data *data = asb100_update_device(dev);
> + struct asb100_data *data = dev_get_drvdata(dev);
> return sprintf(buf, "%d\n", data->vrm);
> }
>
> --- linux-2.6.23-rc9.orig/drivers/hwmon/it87.c 2007-10-08 18:23:56.000000000 +0200
> +++ linux-2.6.23-rc9/drivers/hwmon/it87.c 2007-10-08 18:23:57.000000000 +0200
> @@ -765,7 +765,7 @@ static DEVICE_ATTR(alarms, S_IRUGO, show
> static ssize_t
> show_vrm_reg(struct device *dev, struct device_attribute *attr, char *buf)
> {
> - struct it87_data *data = it87_update_device(dev);
> + struct it87_data *data = dev_get_drvdata(dev);
> return sprintf(buf, "%u\n", data->vrm);
> }
> static ssize_t
> --- linux-2.6.23-rc9.orig/drivers/hwmon/lm85.c 2007-10-08 18:23:56.000000000 +0200
> +++ linux-2.6.23-rc9/drivers/hwmon/lm85.c 2007-10-08 18:23:57.000000000 +0200
> @@ -438,7 +438,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
>
> static ssize_t show_vrm_reg(struct device *dev, struct device_attribute *attr, char *buf)
> {
> - struct lm85_data *data = lm85_update_device(dev);
> + struct lm85_data *data = dev_get_drvdata(dev);
> return sprintf(buf, "%ld\n", (long) data->vrm);
> }
>
> --- linux-2.6.23-rc9.orig/drivers/hwmon/lm87.c 2007-10-08 18:23:57.000000000 +0200
> +++ linux-2.6.23-rc9/drivers/hwmon/lm87.c 2007-10-08 18:23:57.000000000 +0200
> @@ -501,7 +501,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
>
> static ssize_t show_vrm(struct device *dev, struct device_attribute *attr, char *buf)
> {
> - struct lm87_data *data = lm87_update_device(dev);
> + struct lm87_data *data = dev_get_drvdata(dev);
> return sprintf(buf, "%d\n", data->vrm);
> }
> static ssize_t set_vrm(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
> --- linux-2.6.23-rc9.orig/drivers/hwmon/pc87360.c 2007-10-08 18:23:56.000000000 +0200
> +++ linux-2.6.23-rc9/drivers/hwmon/pc87360.c 2007-10-08 18:23:57.000000000 +0200
> @@ -500,7 +500,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
>
> static ssize_t show_vrm(struct device *dev, struct device_attribute *attr, char *buf)
> {
> - struct pc87360_data *data = pc87360_update_device(dev);
> + struct pc87360_data *data = dev_get_drvdata(dev);
> return sprintf(buf, "%u\n", data->vrm);
> }
> static ssize_t set_vrm(struct device *dev, struct device_attribute *attr, const char *buf, size_t count)
> --- linux-2.6.23-rc9.orig/drivers/hwmon/smsc47m192.c 2007-10-08 18:23:56.000000000 +0200
> +++ linux-2.6.23-rc9/drivers/hwmon/smsc47m192.c 2007-10-08 18:23:57.000000000 +0200
> @@ -334,7 +334,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
> static ssize_t show_vrm(struct device *dev, struct device_attribute *attr,
> char *buf)
> {
> - struct smsc47m192_data *data = smsc47m192_update_device(dev);
> + struct smsc47m192_data *data = dev_get_drvdata(dev);
> return sprintf(buf, "%d\n", data->vrm);
> }
>
> --- linux-2.6.23-rc9.orig/drivers/hwmon/w83627hf.c 2007-10-08 18:23:56.000000000 +0200
> +++ linux-2.6.23-rc9/drivers/hwmon/w83627hf.c 2007-10-08 18:23:57.000000000 +0200
> @@ -703,7 +703,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
> static ssize_t
> show_vrm_reg(struct device *dev, struct device_attribute *attr, char *buf)
> {
> - struct w83627hf_data *data = w83627hf_update_device(dev);
> + struct w83627hf_data *data = dev_get_drvdata(dev);
> return sprintf(buf, "%ld\n", (long) data->vrm);
> }
> static ssize_t
> --- linux-2.6.23-rc9.orig/drivers/hwmon/w83781d.c 2007-10-08 18:23:57.000000000 +0200
> +++ linux-2.6.23-rc9/drivers/hwmon/w83781d.c 2007-10-08 18:23:57.000000000 +0200
> @@ -453,7 +453,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
> static ssize_t
> show_vrm_reg(struct device *dev, struct device_attribute *attr, char *buf)
> {
> - struct w83781d_data *data = w83781d_update_device(dev);
> + struct w83781d_data *data = dev_get_drvdata(dev);
> return sprintf(buf, "%ld\n", (long) data->vrm);
> }
>
> --- linux-2.6.23-rc9.orig/drivers/hwmon/w83791d.c 2007-10-08 18:23:56.000000000 +0200
> +++ linux-2.6.23-rc9/drivers/hwmon/w83791d.c 2007-10-08 18:23:57.000000000 +0200
> @@ -832,7 +832,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, sh
> static ssize_t show_vrm_reg(struct device *dev,
> struct device_attribute *attr, char *buf)
> {
> - struct w83791d_data *data = w83791d_update_device(dev);
> + struct w83791d_data *data = dev_get_drvdata(dev);
> return sprintf(buf, "%d\n", data->vrm);
> }
>
>
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [lm-sensors] [PATCH] hwmon: VRM is not read from registers
2007-10-08 16:24 [lm-sensors] [PATCH] hwmon: VRM is not read from registers Jean Delvare
2007-10-08 19:06 ` Hans de Goede
@ 2007-10-09 0:48 ` Mark M. Hoffman
1 sibling, 0 replies; 3+ messages in thread
From: Mark M. Hoffman @ 2007-10-09 0:48 UTC (permalink / raw)
To: lm-sensors
Hi:
* Hans de Goede <j.w.r.degoede@hhs.nl> [2007-10-08 21:06:57 +0200]:
> Jean Delvare wrote:
> > The VRM value is not read from chip registers, so there's no need
> > to update the device data cache before exporting the VRM value to
> > user-space.
> >
> > Signed-off-by: Jean Delvare <khali@linux-fr.org>
>
> Looks good,
>
> Acked-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Applied to hwmon-2.6.git/testing, thanks.
--
Mark M. Hoffman
mhoffman@lightlink.com
_______________________________________________
lm-sensors mailing list
lm-sensors@lm-sensors.org
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2007-10-09 0:48 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-08 16:24 [lm-sensors] [PATCH] hwmon: VRM is not read from registers Jean Delvare
2007-10-08 19:06 ` Hans de Goede
2007-10-09 0:48 ` Mark M. Hoffman
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.