diff options
author | Jingoo Han <jg1.han@samsung.com> | 2013-06-04 00:15:16 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-06 15:54:08 -0400 |
commit | f7b41276b6b07f47c5f5212fa244385b0e3aaa30 (patch) | |
tree | a5c48de78a236e836da7d3b26e999224c975cc11 /drivers/misc/carma | |
parent | 4cd5773a2ae6facdde3f563087a4cc50f00d9530 (diff) |
misc: replace strict_strtoul() with kstrtoul()
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>
Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/misc/carma')
-rw-r--r-- | drivers/misc/carma/carma-fpga-program.c | 10 | ||||
-rw-r--r-- | drivers/misc/carma/carma-fpga.c | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/drivers/misc/carma/carma-fpga-program.c b/drivers/misc/carma/carma-fpga-program.c index fa017cf64bd1..c6bd7e84de24 100644 --- a/drivers/misc/carma/carma-fpga-program.c +++ b/drivers/misc/carma/carma-fpga-program.c | |||
@@ -830,8 +830,9 @@ static ssize_t penable_store(struct device *dev, struct device_attribute *attr, | |||
830 | unsigned long val; | 830 | unsigned long val; |
831 | int ret; | 831 | int ret; |
832 | 832 | ||
833 | if (strict_strtoul(buf, 0, &val)) | 833 | ret = kstrtoul(buf, 0, &val); |
834 | return -EINVAL; | 834 | if (ret) |
835 | return ret; | ||
835 | 836 | ||
836 | if (val) { | 837 | if (val) { |
837 | ret = fpga_enable_power_supplies(priv); | 838 | ret = fpga_enable_power_supplies(priv); |
@@ -859,8 +860,9 @@ static ssize_t program_store(struct device *dev, struct device_attribute *attr, | |||
859 | unsigned long val; | 860 | unsigned long val; |
860 | int ret; | 861 | int ret; |
861 | 862 | ||
862 | if (strict_strtoul(buf, 0, &val)) | 863 | ret = kstrtoul(buf, 0, &val); |
863 | return -EINVAL; | 864 | if (ret) |
865 | return ret; | ||
864 | 866 | ||
865 | /* We can't have an image writer and be programming simultaneously */ | 867 | /* We can't have an image writer and be programming simultaneously */ |
866 | if (mutex_lock_interruptible(&priv->lock)) | 868 | if (mutex_lock_interruptible(&priv->lock)) |
diff --git a/drivers/misc/carma/carma-fpga.c b/drivers/misc/carma/carma-fpga.c index a2128af706b2..7b56563f8b74 100644 --- a/drivers/misc/carma/carma-fpga.c +++ b/drivers/misc/carma/carma-fpga.c | |||
@@ -1002,10 +1002,10 @@ static ssize_t data_en_set(struct device *dev, struct device_attribute *attr, | |||
1002 | unsigned long enable; | 1002 | unsigned long enable; |
1003 | int ret; | 1003 | int ret; |
1004 | 1004 | ||
1005 | ret = strict_strtoul(buf, 0, &enable); | 1005 | ret = kstrtoul(buf, 0, &enable); |
1006 | if (ret) { | 1006 | if (ret) { |
1007 | dev_err(priv->dev, "unable to parse enable input\n"); | 1007 | dev_err(priv->dev, "unable to parse enable input\n"); |
1008 | return -EINVAL; | 1008 | return ret; |
1009 | } | 1009 | } |
1010 | 1010 | ||
1011 | /* protect against concurrent enable/disable */ | 1011 | /* protect against concurrent enable/disable */ |