Skip to content

Commit

Permalink
Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/ker…
Browse files Browse the repository at this point in the history
…nel/git/groeck/linux-staging

Pull hwmon fixes from Guenter Roeck:
 "More fallout from module tests and code inspection.

  Fixes to temperature limit write operations in adt7470 driver.  Also,
  dashes are not allowed in hwmon 'name' attributes.  Fix drivers where
  necessary"

* tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/groeck/linux-staging:
  hwmon: (adt7470) Fix writes to temperature limit registers
  hwmon: (da9055) Don't use dash in the name attribute
  hwmon: (da9052) Don't use dash in the name attribute
  • Loading branch information
torvalds committed Jul 19, 2014
2 parents 0bae49b + de12d6f commit cfd1b99
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions drivers/hwmon/adt7470.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ static ssize_t set_temp_min(struct device *dev,
return -EINVAL;

temp = DIV_ROUND_CLOSEST(temp, 1000);
temp = clamp_val(temp, 0, 255);
temp = clamp_val(temp, -128, 127);

mutex_lock(&data->lock);
data->temp_min[attr->index] = temp;
Expand Down Expand Up @@ -549,7 +549,7 @@ static ssize_t set_temp_max(struct device *dev,
return -EINVAL;

temp = DIV_ROUND_CLOSEST(temp, 1000);
temp = clamp_val(temp, 0, 255);
temp = clamp_val(temp, -128, 127);

mutex_lock(&data->lock);
data->temp_max[attr->index] = temp;
Expand Down Expand Up @@ -826,7 +826,7 @@ static ssize_t set_pwm_tmin(struct device *dev,
return -EINVAL;

temp = DIV_ROUND_CLOSEST(temp, 1000);
temp = clamp_val(temp, 0, 255);
temp = clamp_val(temp, -128, 127);

mutex_lock(&data->lock);
data->pwm_tmin[attr->index] = temp;
Expand Down
2 changes: 1 addition & 1 deletion drivers/hwmon/da9052-hwmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ static ssize_t da9052_hwmon_show_name(struct device *dev,
struct device_attribute *devattr,
char *buf)
{
return sprintf(buf, "da9052-hwmon\n");
return sprintf(buf, "da9052\n");
}

static ssize_t show_label(struct device *dev,
Expand Down
2 changes: 1 addition & 1 deletion drivers/hwmon/da9055-hwmon.c
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ static ssize_t da9055_hwmon_show_name(struct device *dev,
struct device_attribute *devattr,
char *buf)
{
return sprintf(buf, "da9055-hwmon\n");
return sprintf(buf, "da9055\n");
}

static ssize_t show_label(struct device *dev,
Expand Down

0 comments on commit cfd1b99

Please sign in to comment.