powerpc/fadump: use kstrtoint to handle sysfs store
authorMichal Suchanek <msuchanek@suse.de>
Mon, 26 Jun 2017 14:06:01 +0000 (16:06 +0200)
committerMichael Ellerman <mpe@ellerman.id.au>
Sun, 12 Nov 2017 23:51:38 +0000 (10:51 +1100)
commitdcdc46794b7bb76733d9792cca2f45871d66881f
tree47a3ff135729e8fe4fc2ec5f1eeb09528d35db6d
parent6c44741d75a27985a0496cd58b123a58c7177108
powerpc/fadump: use kstrtoint to handle sysfs store

Currently sysfs store handlers in fadump use if buf[0] == 'char'.

This means input "100foo" is interpreted as '1' and "01" as '0'.

Change to kstrtoint so leading zeroes and the like is handled in
expected way.

Signed-off-by: Michal Suchanek <msuchanek@suse.de>
Acked-by: Hari Bathini <hbathini@linux.vnet.ibm.com>
Signed-off-by: Michal Suchanek <a class="moz-txt-link-rfc2396E" href="mailto:msuchanek@suse.de">&lt;msuchanek@suse.de&gt;</a></pre>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/fadump.c