* [PATCH] iio: replace strict_strtoul() with kstrtoul()
@ 2013-06-01 7:10 Jingoo Han
2013-06-02 16:06 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Jingoo Han @ 2013-06-01 7:10 UTC (permalink / raw)
To: 'Jonathan Cameron'; +Cc: linux-iio, Jingoo Han
The usage of strict_strtoul() is not preferred, because
strict_strtoul() is obsolete. Thus, kstrtoul() should be
used.
Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
drivers/iio/adc/max1363.c | 2 +-
drivers/iio/trigger/iio-trig-sysfs.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/adc/max1363.c b/drivers/iio/adc/max1363.c
index 9e6da72..f148d00 100644
--- a/drivers/iio/adc/max1363.c
+++ b/drivers/iio/adc/max1363.c
@@ -660,7 +660,7 @@ static ssize_t max1363_monitor_store_freq(struct device *dev,
unsigned long val;
bool found = false;
- ret = strict_strtoul(buf, 10, &val);
+ ret = kstrtoul(buf, 10, &val);
if (ret)
return -EINVAL;
for (i = 0; i < ARRAY_SIZE(max1363_monitor_speeds); i++)
diff --git a/drivers/iio/trigger/iio-trig-sysfs.c b/drivers/iio/trigger/iio-trig-sysfs.c
index b727bde..effcd0a 100644
--- a/drivers/iio/trigger/iio-trig-sysfs.c
+++ b/drivers/iio/trigger/iio-trig-sysfs.c
@@ -34,7 +34,7 @@ static ssize_t iio_sysfs_trig_add(struct device *dev,
int ret;
unsigned long input;
- ret = strict_strtoul(buf, 10, &input);
+ ret = kstrtoul(buf, 10, &input);
if (ret)
return ret;
ret = iio_sysfs_trigger_probe(input);
@@ -53,7 +53,7 @@ static ssize_t iio_sysfs_trig_remove(struct device *dev,
int ret;
unsigned long input;
- ret = strict_strtoul(buf, 10, &input);
+ ret = kstrtoul(buf, 10, &input);
if (ret)
return ret;
ret = iio_sysfs_trigger_remove(input);
--
1.7.10.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] iio: replace strict_strtoul() with kstrtoul()
2013-06-01 7:10 [PATCH] iio: replace strict_strtoul() with kstrtoul() Jingoo Han
@ 2013-06-02 16:06 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2013-06-02 16:06 UTC (permalink / raw)
To: Jingoo Han; +Cc: 'Jonathan Cameron', linux-iio
On 06/01/2013 08:10 AM, Jingoo Han wrote:
> The usage of strict_strtoul() is not preferred, because
> strict_strtoul() is obsolete. Thus, kstrtoul() should be
> used.
>
hmmm. Normally I'd only take this sort of change
if it were part of a large scale cleanup of a driver, but
as those are both my drivers what the heck, I'll take it.
Applied to the togreg branch of iio.git.
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>
> ---
> drivers/iio/adc/max1363.c | 2 +-
> drivers/iio/trigger/iio-trig-sysfs.c | 4 ++--
> 2 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iio/adc/max1363.c b/drivers/iio/adc/max1363.c
> index 9e6da72..f148d00 100644
> --- a/drivers/iio/adc/max1363.c
> +++ b/drivers/iio/adc/max1363.c
> @@ -660,7 +660,7 @@ static ssize_t max1363_monitor_store_freq(struct device *dev,
> unsigned long val;
> bool found = false;
>
> - ret = strict_strtoul(buf, 10, &val);
> + ret = kstrtoul(buf, 10, &val);
> if (ret)
> return -EINVAL;
> for (i = 0; i < ARRAY_SIZE(max1363_monitor_speeds); i++)
> diff --git a/drivers/iio/trigger/iio-trig-sysfs.c b/drivers/iio/trigger/iio-trig-sysfs.c
> index b727bde..effcd0a 100644
> --- a/drivers/iio/trigger/iio-trig-sysfs.c
> +++ b/drivers/iio/trigger/iio-trig-sysfs.c
> @@ -34,7 +34,7 @@ static ssize_t iio_sysfs_trig_add(struct device *dev,
> int ret;
> unsigned long input;
>
> - ret = strict_strtoul(buf, 10, &input);
> + ret = kstrtoul(buf, 10, &input);
> if (ret)
> return ret;
> ret = iio_sysfs_trigger_probe(input);
> @@ -53,7 +53,7 @@ static ssize_t iio_sysfs_trig_remove(struct device *dev,
> int ret;
> unsigned long input;
>
> - ret = strict_strtoul(buf, 10, &input);
> + ret = kstrtoul(buf, 10, &input);
> if (ret)
> return ret;
> ret = iio_sysfs_trigger_remove(input);
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-06-02 16:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-01 7:10 [PATCH] iio: replace strict_strtoul() with kstrtoul() Jingoo Han
2013-06-02 16:06 ` Jonathan Cameron
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).