Skip to content

Commit

Permalink
x86/pci-calgary_64.c: Remove obsoleted simple_strtoul() usage
Browse files Browse the repository at this point in the history
Change calgary_parse_options() to call kstrtoul() instead of
calling obsoleted simple_strtoul().

Signed-off-by: Shuah Khan <shuahkhan@gmail.com>
Acked-by: Muli Ben-Yehuda <muli@cs.technion.ac.il>
Cc: jdmason@kudzu.us
Link: http://lkml.kernel.org/r/1337556268.3126.5.camel@lorien2
Signed-off-by: Ingo Molnar <mingo@kernel.org>
  • Loading branch information
Shuah Khan authored and Ingo Molnar committed May 21, 2012
1 parent ab7b64e commit 74bc491
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions arch/x86/kernel/pci-calgary_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -1479,8 +1479,9 @@ int __init detect_calgary(void)
static int __init calgary_parse_options(char *p)
{
unsigned int bridge;
unsigned long val;
size_t len;
char* endp;
ssize_t ret;

while (*p) {
if (!strncmp(p, "64k", 3))
Expand Down Expand Up @@ -1511,10 +1512,11 @@ static int __init calgary_parse_options(char *p)
++p;
if (*p == '\0')
break;
bridge = simple_strtoul(p, &endp, 0);
if (p == endp)
ret = kstrtoul(p, 0, &val);
if (ret)
break;

bridge = val;
if (bridge < MAX_PHB_BUS_NUM) {
printk(KERN_INFO "Calgary: disabling "
"translation for PHB %#x\n", bridge);
Expand Down

0 comments on commit 74bc491

Please sign in to comment.