diff options
author | Shuah Khan <shuahkhan@gmail.com> | 2012-06-10 23:13:41 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@kernel.org> | 2012-06-11 04:52:12 -0400 |
commit | e2b297fcf17fc03734e93387fb8195c782286b35 (patch) | |
tree | ef058e891404caa3194058a602c1285805e7af74 | |
parent | c3e228d59bd2054fd57f7f146ef0f6fb0e1996b7 (diff) |
perf/x86: Convert obsolete simple_strtoul() usage to kstrtoul()
Signed-off-by: Shuah Khan <shuahkhan@gmail.com>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Link: http://lkml.kernel.org/r/1339384421.3025.8.camel@lorien2
Signed-off-by: Ingo Molnar <mingo@kernel.org>
-rw-r--r-- | arch/x86/kernel/cpu/perf_event.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/arch/x86/kernel/cpu/perf_event.c b/arch/x86/kernel/cpu/perf_event.c index 000a4746c7ce..766c76d5ec4c 100644 --- a/arch/x86/kernel/cpu/perf_event.c +++ b/arch/x86/kernel/cpu/perf_event.c | |||
@@ -1640,7 +1640,12 @@ static ssize_t set_attr_rdpmc(struct device *cdev, | |||
1640 | struct device_attribute *attr, | 1640 | struct device_attribute *attr, |
1641 | const char *buf, size_t count) | 1641 | const char *buf, size_t count) |
1642 | { | 1642 | { |
1643 | unsigned long val = simple_strtoul(buf, NULL, 0); | 1643 | unsigned long val; |
1644 | ssize_t ret; | ||
1645 | |||
1646 | ret = kstrtoul(buf, 0, &val); | ||
1647 | if (ret) | ||
1648 | return ret; | ||
1644 | 1649 | ||
1645 | if (!!val != !!x86_pmu.attr_rdpmc) { | 1650 | if (!!val != !!x86_pmu.attr_rdpmc) { |
1646 | x86_pmu.attr_rdpmc = !!val; | 1651 | x86_pmu.attr_rdpmc = !!val; |