strict_strtoul is obsolete, use kstrtoul instead

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

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

SVN-Revision: 37562
This commit is contained in:
John Crispin 2013-07-27 09:23:18 +00:00
parent c4413b6e08
commit 4176b6fdd3
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);