[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1291571382-2719-35-git-send-email-adobriyan@gmail.com>
Date: Sun, 5 Dec 2010 19:49:32 +0200
From: Alexey Dobriyan <adobriyan@...il.com>
To: akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org, Alexey Dobriyan <adobriyan@...il.com>
Subject: [PATCH 35/45] kstrtox: convert drivers/platform/x86/
Signed-off-by: Alexey Dobriyan <adobriyan@...il.com>
---
drivers/platform/x86/classmate-laptop.c | 2 +-
drivers/platform/x86/compal-laptop.c | 14 ++++++--------
2 files changed, 7 insertions(+), 9 deletions(-)
diff --git a/drivers/platform/x86/classmate-laptop.c b/drivers/platform/x86/classmate-laptop.c
index 341cbfe..07d7ce6 100644
--- a/drivers/platform/x86/classmate-laptop.c
+++ b/drivers/platform/x86/classmate-laptop.c
@@ -198,7 +198,7 @@ static ssize_t cmpc_accel_sensitivity_store(struct device *dev,
inputdev = dev_get_drvdata(&acpi->dev);
accel = dev_get_drvdata(&inputdev->dev);
- r = strict_strtoul(buf, 0, &sensitivity);
+ r = kstrtoul(buf, 0, &sensitivity);
if (r)
return r;
diff --git a/drivers/platform/x86/compal-laptop.c b/drivers/platform/x86/compal-laptop.c
index 097083c..c4602a4 100644
--- a/drivers/platform/x86/compal-laptop.c
+++ b/drivers/platform/x86/compal-laptop.c
@@ -421,13 +421,12 @@ static ssize_t pwm_enable_store(struct device *dev,
struct device_attribute *attr, const char *buf, size_t count)
{
struct compal_data *data = dev_get_drvdata(dev);
- long val;
+ unsigned int val;
int err;
- err = strict_strtol(buf, 10, &val);
+
+ err = kstrtouint(buf, 10, &val);
if (err)
return err;
- if (val < 0)
- return -EINVAL;
data->pwm_enable = val;
@@ -459,13 +458,12 @@ static ssize_t pwm_store(struct device *dev, struct device_attribute *attr,
const char *buf, size_t count)
{
struct compal_data *data = dev_get_drvdata(dev);
- long val;
+ u8 val;
int err;
- err = strict_strtol(buf, 10, &val);
+
+ err = kstrtou8(buf, 10, &val);
if (err)
return err;
- if (val < 0 || val > 255)
- return -EINVAL;
data->curr_pwm = val;
--
1.7.2.2
--
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