diff options
author | Jean Delvare <khali@linux-fr.org> | 2008-10-17 11:51:20 -0400 |
---|---|---|
committer | Jean Delvare <khali@mahadeva.delvare> | 2008-10-17 11:51:20 -0400 |
commit | a0cf354a71bd2969b2f1868530d3fecaebd6dc3d (patch) | |
tree | 9d3b9656e23d592fd13b205eb2f66ecf8d9f2d7e /drivers/hwmon/adm1026.c | |
parent | 885fe4b1f621fa2c8499e222059b59dbc98583e2 (diff) |
hwmon: (adm1026) Prevent log spamming
When debugging is enabled, the adm1026 driver currently logs the
message "Setting VID from GPIO11-15" 108 times each time you run
"sensors". Once should be enough.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Philip Pokorny <ppokorny@penguincomputing.com>
Diffstat (limited to 'drivers/hwmon/adm1026.c')
-rw-r--r-- | drivers/hwmon/adm1026.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/hwmon/adm1026.c b/drivers/hwmon/adm1026.c index 546be0588798..ff7de40b6e35 100644 --- a/drivers/hwmon/adm1026.c +++ b/drivers/hwmon/adm1026.c | |||
@@ -279,7 +279,6 @@ struct adm1026_data { | |||
279 | u8 fan_min[8]; /* Register value */ | 279 | u8 fan_min[8]; /* Register value */ |
280 | u8 fan_div[8]; /* Decoded value */ | 280 | u8 fan_div[8]; /* Decoded value */ |
281 | struct pwm_data pwm1; /* Pwm control values */ | 281 | struct pwm_data pwm1; /* Pwm control values */ |
282 | int vid; /* Decoded value */ | ||
283 | u8 vrm; /* VRM version */ | 282 | u8 vrm; /* VRM version */ |
284 | u8 analog_out; /* Register value (DAC) */ | 283 | u8 analog_out; /* Register value (DAC) */ |
285 | long alarms; /* Register encoding, combined */ | 284 | long alarms; /* Register encoding, combined */ |
@@ -697,8 +696,6 @@ static struct adm1026_data *adm1026_update_device(struct device *dev) | |||
697 | data->last_config = jiffies; | 696 | data->last_config = jiffies; |
698 | }; /* last_config */ | 697 | }; /* last_config */ |
699 | 698 | ||
700 | dev_dbg(&client->dev, "Setting VID from GPIO11-15.\n"); | ||
701 | data->vid = (data->gpio >> 11) & 0x1f; | ||
702 | data->valid = 1; | 699 | data->valid = 1; |
703 | mutex_unlock(&data->update_lock); | 700 | mutex_unlock(&data->update_lock); |
704 | return data; | 701 | return data; |
@@ -1215,7 +1212,10 @@ static DEVICE_ATTR(analog_out, S_IRUGO | S_IWUSR, show_analog_out_reg, | |||
1215 | static ssize_t show_vid_reg(struct device *dev, struct device_attribute *attr, char *buf) | 1212 | static ssize_t show_vid_reg(struct device *dev, struct device_attribute *attr, char *buf) |
1216 | { | 1213 | { |
1217 | struct adm1026_data *data = adm1026_update_device(dev); | 1214 | struct adm1026_data *data = adm1026_update_device(dev); |
1218 | return sprintf(buf, "%d\n", vid_from_reg(data->vid & 0x3f, data->vrm)); | 1215 | int vid = (data->gpio >> 11) & 0x1f; |
1216 | |||
1217 | dev_dbg(dev, "Setting VID from GPIO11-15.\n"); | ||
1218 | return sprintf(buf, "%d\n", vid_from_reg(vid, data->vrm)); | ||
1219 | } | 1219 | } |
1220 | static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid_reg, NULL); | 1220 | static DEVICE_ATTR(cpu0_vid, S_IRUGO, show_vid_reg, NULL); |
1221 | 1221 | ||