Skip to content

Commit

Permalink
mfd: aat2870-core: Stop using obsolte simple_strtoul()
Browse files Browse the repository at this point in the history
Soothes checkpatch warning:

    WARNING: simple_strtoul is obsolete, use kstrtoul instead
    torvalds#306: FILE: drivers/mfd/aat2870-core.c:306:
    +	addr = simple_strtoul(start, &start, 16);

Signed-off-by: Lee Jones <[email protected]>
  • Loading branch information
Lee Jones committed Jul 9, 2014
1 parent 0363be8 commit 0ebc1c2
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion drivers/mfd/aat2870-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 0ebc1c2

Please sign in to comment.