kernel/reboot.c: convert simple_strtoul to kstrtoint
Replace obsolete function. kstrtoint is used as reboot_cpu is an integer. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Родитель
6c5a53c670
Коммит
616feab753
|
@ -388,15 +388,22 @@ static int __init reboot_setup(char *str)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case 's':
|
case 's':
|
||||||
if (isdigit(*(str+1)))
|
{
|
||||||
reboot_cpu = simple_strtoul(str+1, NULL, 0);
|
int rc;
|
||||||
else if (str[1] == 'm' && str[2] == 'p' &&
|
|
||||||
isdigit(*(str+3)))
|
if (isdigit(*(str+1))) {
|
||||||
reboot_cpu = simple_strtoul(str+3, NULL, 0);
|
rc = kstrtoint(str+1, 0, &reboot_cpu);
|
||||||
else
|
if (rc)
|
||||||
|
return rc;
|
||||||
|
} else if (str[1] == 'm' && str[2] == 'p' &&
|
||||||
|
isdigit(*(str+3))) {
|
||||||
|
rc = kstrtoint(str+3, 0, &reboot_cpu);
|
||||||
|
if (rc)
|
||||||
|
return rc;
|
||||||
|
} else
|
||||||
reboot_mode = REBOOT_SOFT;
|
reboot_mode = REBOOT_SOFT;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
case 'g':
|
case 'g':
|
||||||
reboot_mode = REBOOT_GPIO;
|
reboot_mode = REBOOT_GPIO;
|
||||||
break;
|
break;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче