Merge branch 'tracing-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / arch / powerpc / kernel / ppc970-pmu.c
index 6637c87..4795744 100644 (file)
@@ -9,8 +9,7 @@
  * 2 of the License, or (at your option) any later version.
  */
 #include <linux/string.h>
-#include <linux/perf_counter.h>
-#include <linux/string.h>
+#include <linux/perf_event.h>
 #include <asm/reg.h>
 #include <asm/cputable.h>
 
@@ -489,8 +488,9 @@ static struct power_pmu ppc970_pmu = {
 
 static int init_ppc970_pmu(void)
 {
-       if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970")
-           && strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970MP"))
+       if (!cur_cpu_spec->oprofile_cpu_type ||
+           (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970")
+            && strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc64/970MP")))
                return -ENODEV;
 
        return register_power_pmu(&ppc970_pmu);