Skip to contentSkip to conversation

therm_adt746x: signed/unsigned confusion

PATCH New Roel Kluin 1 participant 1 message Jan 18, 2009

Subsystems (2)
lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 therm_adt746x: signed/unsigned confusion

As suggested, this is used for signed rather than unsigned

---

drivers/macintosh/therm_adt746x.c +2 -2
index 82607ad..c0621d5 100644
@@ -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);	\