diff options
author | Mark Rutland <mark.rutland@arm.com> | 2017-04-11 11:39:45 +0300 |
---|---|---|
committer | Will Deacon <will.deacon@arm.com> | 2017-04-11 18:29:53 +0300 |
commit | 083c52144a19c69b7956aa53c913ba621f7c5ae2 (patch) | |
tree | 4ac19de3eb832f5758f2999f351430d3ebcee6a5 /drivers | |
parent | a9e469d1c89b5e9890859b5f001601498549577d (diff) | |
download | linux-083c52144a19c69b7956aa53c913ba621f7c5ae2.tar.xz |
drivers/perf: arm_pmu: define armpmu_init_fn
We expect an ARM PMU's init function to have a particular prototype,
which we open-code in a few places. This is less than ideal, considering
that we cast a void value to this type in one location, and a mismatch
could easily be missed.
Add a typedef so that we can ensure this is consistent.
Signed-off-by: Mark Rutland <mark.rutland@arm.com>
Tested-by: Jeremy Linton <jeremy.linton@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/perf/arm_pmu.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/perf/arm_pmu.c b/drivers/perf/arm_pmu.c index 316c4dcc9856..71a825df47ed 100644 --- a/drivers/perf/arm_pmu.c +++ b/drivers/perf/arm_pmu.c @@ -989,7 +989,7 @@ int arm_pmu_device_probe(struct platform_device *pdev, const struct pmu_probe_info *probe_table) { const struct of_device_id *of_id; - const int (*init_fn)(struct arm_pmu *); + armpmu_init_fn init_fn; struct device_node *node = pdev->dev.of_node; struct arm_pmu *pmu; int ret = -ENODEV; |