Messages in this thread Patch in this message | | | From | Alexey Dobriyan <> | Subject | [PATCH 15/52] kstrtox: convert drivers/clocksource/ | Date | Sat, 5 Feb 2011 16:20:18 +0200 |
| |
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> --- drivers/clocksource/acpi_pm.c | 14 ++++++-------- 1 files changed, 6 insertions(+), 8 deletions(-)
diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c index effe797..79643d5 100644 --- a/drivers/clocksource/acpi_pm.c +++ b/drivers/clocksource/acpi_pm.c @@ -233,15 +233,13 @@ fs_initcall(init_acpi_pm_clocksource); */ static int __init parse_pmtmr(char *arg) { - unsigned long base; + u32 base; + int rv; - if (strict_strtoul(arg, 16, &base)) - return -EINVAL; -#ifdef CONFIG_X86_64 - if (base > UINT_MAX) - return -ERANGE; -#endif - printk(KERN_INFO "PMTMR IOPort override: 0x%04x -> 0x%04lx\n", + rv = kstrtou32(arg, 16, &base); + if (rv < 0) + return rv; + printk(KERN_INFO "PMTMR IOPort override: 0x%04x -> 0x%04x\n", pmtmr_ioport, base); pmtmr_ioport = base; -- 1.7.3.4
| |