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.
 -----BEGIN PGP SIGNATURE-----
 Version: GnuPG v1
 
 iQIcBAABAgAGBQJTx08gAAoJEMsfJm/On5mBDCkQAIsUQlxbUr6C0B9Sbi+LlMe9
 APEJnxDyUjsPfuykxcD6myPkOKIIVnE3H0zV5c/poiSjCLrgIdFmFcc477OYcdXH
 7zcO7VvlHgh5orLN9OVO3cTKVICPoubdLbSxgnP5Q/4M6N+LAbodIaxJ2+Sw8xco
 j9uw6gKxA8S12ak83u+i2df14P2VQFpXTGfEyTvl8B/1stGq22X8mCEayrQOviep
 Y/h1ZnHAY9PCMIRjW8+jnGR0r8JwKlvOZFdTyd2MlHU0hDtGtjhZxeD6ig4VbWvp
 UWBB5fvWdpGbVd6/c8VpMtOKVPaxcEvRDzekhXXjmdDObJYXz9gWxP9uX00+FpF1
 AmJ9pYw8aOmt7RUY/+WviKG3Z915NtWVAQ7C3HJneDjcE5fLnlidmsQyl9rapYOC
 KW3xBJK667fQNVx/9Mff8guffVt1lmuvw6fhAKL1z3i9M/0Qqk/rHxz3Mx7gsUcf
 4Ul909mqLzZvIZTvwq47ivWg3KX4uV//YtlFDd07+L4j9ZkszI2mxLHj36uXl4m/
 emFm6Xd4UPMm+zyHOkakZcn/z/ae36QRGJ5F7D16qF07rYm4ZjgrhFFSApoGrgSq
 nNrT+iJ/resIm3uukt9OnkszUMFp1Y4NUsYu9MAXEw9Yr6uMWRQZQ3g7e2E1JEte
 AyYhlpcb6lCjP7WO1aWm
 =LmdI
 -----END PGP SIGNATURE-----

Merge tag 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/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
This commit is contained in:
Linus Torvalds 2014-07-18 20:37:24 -10:00
commit cfd1b99b4a
3 changed files with 5 additions and 5 deletions

View file

@ -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;
@ -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;
@ -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;

View file

@ -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,

View file

@ -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,