Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 90d6619a authored by Jean Delvare's avatar Jean Delvare Committed by Mark M. Hoffman
Browse files

hwmon: VRM is not read from registers



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: default avatarJean Delvare <khali@linux-fr.org>
Acked-by: default avatarHans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: default avatarMark M. Hoffman <mhoffman@lightlink.com>
parent a1aa5a77
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -292,7 +292,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL);

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)
+1 −1
Original line number Diff line number Diff line
@@ -1221,7 +1221,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid_reg, NULL);

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,
+1 −1
Original line number Diff line number Diff line
@@ -514,7 +514,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid, NULL);
/* 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);
}

+1 −1
Original line number Diff line number Diff line
@@ -765,7 +765,7 @@ static DEVICE_ATTR(alarms, S_IRUGO, show_alarms, NULL);
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
+1 −1
Original line number Diff line number Diff line
@@ -438,7 +438,7 @@ static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid_reg, NULL);

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);
}

Loading