1
0
Fork 0

therm_adt746x: Fix signed/unsigned confusion

As suggested, this is used for signed rather than unsigned

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
hifive-unleashed-5.1
roel kluin 2009-01-18 02:03:47 +00:00 committed by Benjamin Herrenschmidt
parent c3bd517de6
commit 2e74778c76
1 changed files with 2 additions and 2 deletions

View File

@ -498,8 +498,8 @@ static ssize_t store_##name(struct device *dev, struct device_attribute *attr, c
#define BUILD_STORE_FUNC_INT(name, data) \
static ssize_t store_##name(struct device *dev, struct device_attribute *attr, const char *buf, size_t n) \
{ \
u32 val; \
val = simple_strtoul(buf, NULL, 10); \
int val; \
val = simple_strtol(buf, NULL, 10); \
if (val < 0 || val > 255) \
return -EINVAL; \
printk(KERN_INFO "Setting specified fan speed to %d\n", val); \