aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/clocksource
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2012-10-20 00:46:02 -0400
committerJohn Stultz <john.stultz@linaro.org>2012-11-13 14:04:50 -0500
commit60e3bf14d4e2a9fcc11c2fc33f572bfafa8ece92 (patch)
treeb93870f564ac75a7b820abdeae540f18a3e78161 /drivers/clocksource
parenta1c2d60889d633ffecfa9f1f7ac0bdb474b7484e (diff)
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: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: John Stultz <john.stultz@linaro.org>
Diffstat (limited to 'drivers/clocksource')
-rw-r--r--drivers/clocksource/acpi_pm.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/drivers/clocksource/acpi_pm.c b/drivers/clocksource/acpi_pm.c
index 6b5cf02c35c8..5d1b9268bcaf 100644
--- a/drivers/clocksource/acpi_pm.c
+++ b/drivers/clocksource/acpi_pm.c
@@ -233,16 +233,15 @@ fs_initcall(init_acpi_pm_clocksource);
233 */ 233 */
234static int __init parse_pmtmr(char *arg) 234static int __init parse_pmtmr(char *arg)
235{ 235{
236 unsigned long base; 236 unsigned int base;
237 int ret;
237 238
238 if (strict_strtoul(arg, 16, &base)) 239 ret = kstrtouint(arg, 16, &base);
239 return -EINVAL; 240 if (ret)
240#ifdef CONFIG_X86_64 241 return ret;
241 if (base > UINT_MAX) 242
242 return -ERANGE; 243 pr_info("PMTMR IOPort override: 0x%04x -> 0x%04x\n", pmtmr_ioport,
243#endif 244 base);
244 printk(KERN_INFO "PMTMR IOPort override: 0x%04x -> 0x%04lx\n",
245 pmtmr_ioport, base);
246 pmtmr_ioport = base; 245 pmtmr_ioport = base;
247 246
248 return 1; 247 return 1;