therm_adt746x: Fix signed/unsigned confusion
authorroel kluin <roel.kluin@gmail.com>
Sun, 18 Jan 2009 02:03:47 +0000 (02:03 +0000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Wed, 11 Feb 2009 05:00:07 +0000 (16:00 +1100)
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>
drivers/macintosh/therm_adt746x.c

index 82607ad..c0621d5 100644 (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);   \