strict_strtoul is obsolete, use kstrtoul instead

based on http://patchwork.openwrt.org/patch/3827/

Signed-off-by: John Crispin <blogic@openwrt.org>

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@37562 3c298f89-4303-0410-b956-a3cf2f4a3e73
master
John Crispin 2013-07-27 09:23:18 +00:00
parent 27b62a8629
commit 023ed9c87c
13 changed files with 53 additions and 53 deletions

View File

@ -47,7 +47,7 @@
+ return -EFAULT;
+
+ buf[len] = '\0';
+ if (strict_strtoul(buf, 0, &chan_bw))
+ if (kstrtoul(buf, 0, &chan_bw))
+ return -EINVAL;
+
+ sc->chan_bw = chan_bw;

View File

@ -30,7 +30,7 @@
+ return -EFAULT;
+
+ buf[len] = '\0';
+ if (strict_strtoul(buf, 0, &diag))
+ if (kstrtoul(buf, 0, &diag))
+ return -EINVAL;
+
+ ah->diag = diag;

View File

@ -743,7 +743,7 @@ static ssize_t rtl8366_write_debugfs_reg(struct file *file,
buf[len - 1] = '\0';
if (strict_strtoul(buf, 16, &data)) {
if (kstrtoul(buf, 16, &data)) {
dev_err(smi->parent, "Invalid reg value %s\n", buf);
} else {
err = rtl8366_smi_write_reg(smi, reg, data);

View File

@ -357,7 +357,7 @@
+ unsigned long data;
+
+ if (attr == &gpiommc_attr_register) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -378,7 +378,7 @@
+ }
+
+ if (attr == &gpiommc_attr_DI) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -389,7 +389,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_DO) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -400,7 +400,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_CLK) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -411,7 +411,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_CS) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -422,7 +422,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_CS_activelow) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -433,7 +433,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_spimode) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -457,7 +457,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_spidelay) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -468,7 +468,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_max_bus_speed) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;

View File

@ -37,7 +37,7 @@ does not lock access between files.
+ mutex_lock(&dev->mutex);
+
if (attr == &gpiommc_attr_register) {
err = strict_strtoul(page, 10, &data);
err = kstrtoul(page, 10, &data);
if (err)
@@ -478,6 +486,8 @@ static ssize_t gpiommc_config_attr_store
WARN_ON(1);

View File

@ -357,7 +357,7 @@
+ unsigned long data;
+
+ if (attr == &gpiommc_attr_register) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -378,7 +378,7 @@
+ }
+
+ if (attr == &gpiommc_attr_DI) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -389,7 +389,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_DO) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -400,7 +400,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_CLK) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -411,7 +411,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_CS) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -422,7 +422,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_CS_activelow) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -433,7 +433,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_spimode) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -457,7 +457,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_spidelay) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -468,7 +468,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_max_bus_speed) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;

View File

@ -37,7 +37,7 @@ does not lock access between files.
+ mutex_lock(&dev->mutex);
+
if (attr == &gpiommc_attr_register) {
err = strict_strtoul(page, 10, &data);
err = kstrtoul(page, 10, &data);
if (err)
@@ -478,6 +486,8 @@ static ssize_t gpiommc_config_attr_store
WARN_ON(1);

View File

@ -357,7 +357,7 @@
+ unsigned long data;
+
+ if (attr == &gpiommc_attr_register) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -378,7 +378,7 @@
+ }
+
+ if (attr == &gpiommc_attr_DI) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -389,7 +389,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_DO) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -400,7 +400,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_CLK) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -411,7 +411,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_CS) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -422,7 +422,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_CS_activelow) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -433,7 +433,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_spimode) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -457,7 +457,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_spidelay) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -468,7 +468,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_max_bus_speed) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;

View File

@ -37,7 +37,7 @@ does not lock access between files.
+ mutex_lock(&dev->mutex);
+
if (attr == &gpiommc_attr_register) {
err = strict_strtoul(page, 10, &data);
err = kstrtoul(page, 10, &data);
if (err)
@@ -478,6 +486,8 @@ static ssize_t gpiommc_config_attr_store
WARN_ON(1);

View File

@ -357,7 +357,7 @@
+ unsigned long data;
+
+ if (attr == &gpiommc_attr_register) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -378,7 +378,7 @@
+ }
+
+ if (attr == &gpiommc_attr_DI) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -389,7 +389,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_DO) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -400,7 +400,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_CLK) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -411,7 +411,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_CS) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -422,7 +422,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_CS_activelow) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -433,7 +433,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_spimode) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -457,7 +457,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_spidelay) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -468,7 +468,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_max_bus_speed) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;

View File

@ -37,7 +37,7 @@ does not lock access between files.
+ mutex_lock(&dev->mutex);
+
if (attr == &gpiommc_attr_register) {
err = strict_strtoul(page, 10, &data);
err = kstrtoul(page, 10, &data);
if (err)
@@ -478,6 +486,8 @@ static ssize_t gpiommc_config_attr_store
WARN_ON(1);

View File

@ -357,7 +357,7 @@
+ unsigned long data;
+
+ if (attr == &gpiommc_attr_register) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -378,7 +378,7 @@
+ }
+
+ if (attr == &gpiommc_attr_DI) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -389,7 +389,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_DO) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -400,7 +400,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_CLK) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -411,7 +411,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_CS) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -422,7 +422,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_CS_activelow) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -433,7 +433,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_spimode) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -457,7 +457,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_spidelay) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;
@ -468,7 +468,7 @@
+ goto out;
+ }
+ if (attr == &gpiommc_attr_max_bus_speed) {
+ err = strict_strtoul(page, 10, &data);
+ err = kstrtoul(page, 10, &data);
+ if (err)
+ goto out;
+ err = -EINVAL;

View File

@ -37,7 +37,7 @@ does not lock access between files.
+ mutex_lock(&dev->mutex);
+
if (attr == &gpiommc_attr_register) {
err = strict_strtoul(page, 10, &data);
err = kstrtoul(page, 10, &data);
if (err)
@@ -478,6 +486,8 @@ static ssize_t gpiommc_config_attr_store
WARN_ON(1);