coresight: cti: Increase reference count when enabling cti
authorTingwei Zhang <tingwei@codeaurora.org>
Mon, 28 Sep 2020 16:35:08 +0000 (10:35 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 28 Sep 2020 17:47:41 +0000 (19:47 +0200)
commitf02b089e7bddd2f66e63f926960a4e384b1f436d
tree24e4529cc2f248b6e5895ca081fa96ef50c6dbb2
parentf2ccc7b7bfa91b5cad5a4d57b269f6d7bbafd67d
coresight: cti: Increase reference count when enabling cti

CTI device is enabled when associated coresight device is enabled.
Increase the module and device reference count for CTI device
when it's enabled. This can prevent CTI device be removed or
module be unloaded when CTI device is enabled by an active trace
session.

Signed-off-by: Mike Leach <mike.leach@linaro.org>
Signed-off-by: Tingwei Zhang <tingwei@codeaurora.org>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20200928163513.70169-21-mathieu.poirier@linaro.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/hwtracing/coresight/coresight.c