Commit 60e3bf14 authored by Dan Carpenter's avatar Dan Carpenter Committed by John Stultz

clocksource: clean up parse_pmtmr()

I changed the strict_strtoul() to kstrtouint().  That has the check
for UINT_MAX built in to it so the ifdefs can be removed.  Also
I changed a printk() to pr_info().
Signed-off-by: default avatarDan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
parent a1c2d608
...@@ -233,16 +233,15 @@ fs_initcall(init_acpi_pm_clocksource); ...@@ -233,16 +233,15 @@ fs_initcall(init_acpi_pm_clocksource);
*/ */
static int __init parse_pmtmr(char *arg) static int __init parse_pmtmr(char *arg)
{ {
unsigned long base; unsigned int base;
int ret;
if (strict_strtoul(arg, 16, &base)) ret = kstrtouint(arg, 16, &base);
return -EINVAL; if (ret)
#ifdef CONFIG_X86_64 return ret;
if (base > UINT_MAX)
return -ERANGE; pr_info("PMTMR IOPort override: 0x%04x -> 0x%04x\n", pmtmr_ioport,
#endif base);
printk(KERN_INFO "PMTMR IOPort override: 0x%04x -> 0x%04lx\n",
pmtmr_ioport, base);
pmtmr_ioport = base; pmtmr_ioport = base;
return 1; return 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment