diff options
author | Lee Jones <lee.jones@linaro.org> | 2014-05-08 13:58:24 +0200 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2014-07-09 17:38:04 +0200 |
commit | 0ebc1c25ca2921f6e9becb9b3e6ea3ee2ffc8aaf (patch) | |
tree | 77dcff57af7126015ef55a191f12bd3afd350001 /drivers/mfd/aat2870-core.c | |
parent | mfd: 88pm860x-i2c: Repair 'space before tab' warning (diff) | |
download | linux-0ebc1c25ca2921f6e9becb9b3e6ea3ee2ffc8aaf.tar.xz linux-0ebc1c25ca2921f6e9becb9b3e6ea3ee2ffc8aaf.zip |
mfd: aat2870-core: Stop using obsolte simple_strtoul()
Soothes checkpatch warning:
WARNING: simple_strtoul is obsolete, use kstrtoul instead
#306: FILE: drivers/mfd/aat2870-core.c:306:
+ addr = simple_strtoul(start, &start, 16);
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Diffstat (limited to 'drivers/mfd/aat2870-core.c')
-rw-r--r-- | drivers/mfd/aat2870-core.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/mfd/aat2870-core.c b/drivers/mfd/aat2870-core.c index 14d9542a4eed..4e6e03d63e12 100644 --- a/drivers/mfd/aat2870-core.c +++ b/drivers/mfd/aat2870-core.c @@ -303,7 +303,10 @@ static ssize_t aat2870_reg_write_file(struct file *file, while (*start == ' ') start++; - addr = simple_strtoul(start, &start, 16); + ret = kstrtoul(start, 16, &addr); + if (ret) + return ret; + if (addr >= AAT2870_REG_NUM) { dev_err(aat2870->dev, "Invalid address, 0x%lx\n", addr); return -EINVAL; |