File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 47
47
#include <linux/kernel.h>
48
48
#include <linux/list.h>
49
49
#include <linux/msi.h>
50
+ #include <linux/of.h>
50
51
#include <linux/perf_event.h>
51
52
#include <linux/platform_device.h>
52
53
#include <linux/smp.h>
@@ -834,7 +835,8 @@ static int smmu_pmu_probe(struct platform_device *pdev)
834
835
return - EINVAL ;
835
836
}
836
837
837
- smmu_pmu_get_acpi_options (smmu_pmu );
838
+ if (!dev -> of_node )
839
+ smmu_pmu_get_acpi_options (smmu_pmu );
838
840
839
841
/* Pick one CPU to be the preferred one to use */
840
842
smmu_pmu -> on_cpu = raw_smp_processor_id ();
@@ -884,9 +886,16 @@ static void smmu_pmu_shutdown(struct platform_device *pdev)
884
886
smmu_pmu_disable (& smmu_pmu -> pmu );
885
887
}
886
888
889
+ static const struct of_device_id smmu_pmu_of_match [] = {
890
+ { .compatible = "arm,smmu-v3-pmcg" },
891
+ {}
892
+ };
893
+ MODULE_DEVICE_TABLE (of , smmu_pmu_of_match );
894
+
887
895
static struct platform_driver smmu_pmu_driver = {
888
896
.driver = {
889
897
.name = "arm-smmu-v3-pmcg" ,
898
+ .of_match_table = of_match_ptr (smmu_pmu_of_match ),
890
899
.suppress_bind_attrs = true,
891
900
},
892
901
.probe = smmu_pmu_probe ,
You can’t perform that action at this time.
0 commit comments