coresight: Make refcount a property of the connection
[platform/kernel/linux-starfive.git] / drivers / hwtracing / coresight / coresight-tpiu.c
index b0179f7..59eac93 100644 (file)
@@ -73,7 +73,7 @@ static int tpiu_enable(struct coresight_device *csdev, enum cs_mode mode,
                       void *__unused)
 {
        tpiu_enable_hw(&csdev->access);
-       atomic_inc(csdev->refcnt);
+       atomic_inc(&csdev->refcnt);
        dev_dbg(&csdev->dev, "TPIU enabled\n");
        return 0;
 }
@@ -96,7 +96,7 @@ static void tpiu_disable_hw(struct csdev_access *csa)
 
 static int tpiu_disable(struct coresight_device *csdev)
 {
-       if (atomic_dec_return(csdev->refcnt))
+       if (atomic_dec_return(&csdev->refcnt))
                return -EBUSY;
 
        tpiu_disable_hw(&csdev->access);