[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1258345082-11811-11-git-send-email-shawn.bohrer@gmail.com>
Date: Sun, 15 Nov 2009 22:17:59 -0600
From: Shawn Bohrer <shawn.bohrer@...il.com>
To: Greg Kroah-Hartman <gregkh@...e.de>
Cc: devel@...verdev.osuosl.org, linux-kernel@...r.kernel.org,
Shawn Bohrer <shawn.bohrer@...il.com>
Subject: [PATCH 10/13] staging: line6: Convert simple_strtol to strict_strtol in toneport.c
Signed-off-by: Shawn Bohrer <shawn.bohrer@...il.com>
---
drivers/staging/line6/toneport.c | 20 ++++++++++++++++----
1 files changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/staging/line6/toneport.c b/drivers/staging/line6/toneport.c
index 84bf29c..e6770ea 100644
--- a/drivers/staging/line6/toneport.c
+++ b/drivers/staging/line6/toneport.c
@@ -96,8 +96,14 @@ static ssize_t toneport_set_led_red(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
- char *c;
- led_red = simple_strtol(buf, &c, 10);
+ int retval;
+ long value;
+
+ retval = strict_strtol(buf, 10, &value);
+ if (retval)
+ return retval;
+
+ led_red = value;
toneport_update_led(dev);
return count;
}
@@ -106,8 +112,14 @@ static ssize_t toneport_set_led_green(struct device *dev,
struct device_attribute *attr,
const char *buf, size_t count)
{
- char *c;
- led_green = simple_strtol(buf, &c, 10);
+ int retval;
+ long value;
+
+ retval = strict_strtol(buf, 10, &value);
+ if (retval)
+ return retval;
+
+ led_green = value;
toneport_update_led(dev);
return count;
}
--
1.6.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists