coresight: trbe: Allocate platform data per device
authorSuzuki K Poulose <suzuki.poulose@arm.com>
Wed, 16 Aug 2023 12:51:50 +0000 (13:51 +0100)
committerSuzuki K Poulose <suzuki.poulose@arm.com>
Thu, 17 Aug 2023 10:43:02 +0000 (11:43 +0100)
commit39744738a67de9153d73e11817937c0004feab2e
tree507939f4d43aa98fa5e192deef527867fa4ac9d1
parent484281bd5b989a31c1045786e326084652ea49a0
coresight: trbe: Allocate platform data per device

Coresight TRBE driver shares a single platform data (which is empty btw).
However, with the commit 4e8fe7e5c3a5
("coresight: Store pointers to connections rather than an array of them")
the coresight core would free up the pdata, resulting in multiple attempts
to free the same pdata for TRBE instances. Fix this by allocating a pdata per
coresight_device.

Fixes: 4e8fe7e5c3a5 ("coresight: Store pointers to connections rather than an array of them")
Link: https://lore.kernel.org/r/20230814093813.19152-3-hejunhao3@huawei.com
Reported-by: Junhao He <hejunhao3@huawei.com>
Cc: Anshuman Khandual <anshuman.khandual@arm.com>
Cc: James Clark <james.clark@arm.com>
Tested-by: Junhao He <hejunhao3@huawei.com>
Link: https://lore.kernel.org/r/20230816141008.535450-2-suzuki.poulose@arm.com
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
drivers/hwtracing/coresight/coresight-trbe.c