diff options
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/pci-calgary_64.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/arch/x86/kernel/pci-calgary_64.c b/arch/x86/kernel/pci-calgary_64.c index 6ac5782f4d6b..dbbfb261e62c 100644 --- a/arch/x86/kernel/pci-calgary_64.c +++ b/arch/x86/kernel/pci-calgary_64.c | |||
@@ -1479,8 +1479,9 @@ cleanup: | |||
1479 | static int __init calgary_parse_options(char *p) | 1479 | static int __init calgary_parse_options(char *p) |
1480 | { | 1480 | { |
1481 | unsigned int bridge; | 1481 | unsigned int bridge; |
1482 | unsigned long val; | ||
1482 | size_t len; | 1483 | size_t len; |
1483 | char* endp; | 1484 | ssize_t ret; |
1484 | 1485 | ||
1485 | while (*p) { | 1486 | while (*p) { |
1486 | if (!strncmp(p, "64k", 3)) | 1487 | if (!strncmp(p, "64k", 3)) |
@@ -1511,10 +1512,11 @@ static int __init calgary_parse_options(char *p) | |||
1511 | ++p; | 1512 | ++p; |
1512 | if (*p == '\0') | 1513 | if (*p == '\0') |
1513 | break; | 1514 | break; |
1514 | bridge = simple_strtoul(p, &endp, 0); | 1515 | ret = kstrtoul(p, 0, &val); |
1515 | if (p == endp) | 1516 | if (ret) |
1516 | break; | 1517 | break; |
1517 | 1518 | ||
1519 | bridge = val; | ||
1518 | if (bridge < MAX_PHB_BUS_NUM) { | 1520 | if (bridge < MAX_PHB_BUS_NUM) { |
1519 | printk(KERN_INFO "Calgary: disabling " | 1521 | printk(KERN_INFO "Calgary: disabling " |
1520 | "translation for PHB %#x\n", bridge); | 1522 | "translation for PHB %#x\n", bridge); |