perf: Register PMU implementations
[GitHub/mt8127/android_kernel_alcatel_ttab.git] / arch / powerpc / kernel / mpc7450-pmu.c
index 75ff47fed7bfcadf9d69028297b09796c9e8a342..09d72028f317755428865f5105ee6b76b829ad7a 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>
 
@@ -408,7 +407,8 @@ struct power_pmu mpc7450_pmu = {
 
 static int init_mpc7450_pmu(void)
 {
-       if (strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc/7450"))
+       if (!cur_cpu_spec->oprofile_cpu_type ||
+           strcmp(cur_cpu_spec->oprofile_cpu_type, "ppc/7450"))
                return -ENODEV;
 
        return register_power_pmu(&mpc7450_pmu);