diff mbox series

coresight: etm_pmu: Set the module field

Message ID 20230405094922.667834-1-suzuki.poulose@arm.com (mailing list archive)
State New, archived
Headers show
Series coresight: etm_pmu: Set the module field | expand

Commit Message

Suzuki K Poulose April 5, 2023, 9:49 a.m. UTC
struct pmu::module must be set to the module owning the PMU driver.
Set this for the coresight etm_pmu.

Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
---
 drivers/hwtracing/coresight/coresight-etm-perf.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Suzuki K Poulose April 14, 2023, 11:02 a.m. UTC | #1
On 05/04/2023 10:49, Suzuki K Poulose wrote:
> struct pmu::module must be set to the module owning the PMU driver.
> Set this for the coresight etm_pmu.
> 
> Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>

I should have added:

Fixes: 8e264c52e1dab ("coresight: core: Allow the coresight core driver 
to be built as a module")
Cc: stable@vger.kernel.org

Suzuki

> ---
>   drivers/hwtracing/coresight/coresight-etm-perf.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c
> index a48c97da8165..711f451b6946 100644
> --- a/drivers/hwtracing/coresight/coresight-etm-perf.c
> +++ b/drivers/hwtracing/coresight/coresight-etm-perf.c
> @@ -901,6 +901,7 @@ int __init etm_perf_init(void)
>   	etm_pmu.addr_filters_sync	= etm_addr_filters_sync;
>   	etm_pmu.addr_filters_validate	= etm_addr_filters_validate;
>   	etm_pmu.nr_addr_filters		= ETM_ADDR_CMP_MAX;
> +	etm_pmu.module			= THIS_MODULE;
>   
>   	ret = perf_pmu_register(&etm_pmu, CORESIGHT_ETM_PMU_NAME, -1);
>   	if (ret == 0)
diff mbox series

Patch

diff --git a/drivers/hwtracing/coresight/coresight-etm-perf.c b/drivers/hwtracing/coresight/coresight-etm-perf.c
index a48c97da8165..711f451b6946 100644
--- a/drivers/hwtracing/coresight/coresight-etm-perf.c
+++ b/drivers/hwtracing/coresight/coresight-etm-perf.c
@@ -901,6 +901,7 @@  int __init etm_perf_init(void)
 	etm_pmu.addr_filters_sync	= etm_addr_filters_sync;
 	etm_pmu.addr_filters_validate	= etm_addr_filters_validate;
 	etm_pmu.nr_addr_filters		= ETM_ADDR_CMP_MAX;
+	etm_pmu.module			= THIS_MODULE;
 
 	ret = perf_pmu_register(&etm_pmu, CORESIGHT_ETM_PMU_NAME, -1);
 	if (ret == 0)