]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blobdiff - drivers/hwtracing/coresight/coresight-tpiu.c
coresight: Use platform agnostic names
[mirror_ubuntu-hirsute-kernel.git] / drivers / hwtracing / coresight / coresight-tpiu.c
index b699d613425d65391bca643d3a53d19ab85f9fa2..f8583e4032a6880e0cedbce384bec5f6c7c67e3e 100644 (file)
@@ -47,6 +47,8 @@
 #define FFCR_FON_MAN           BIT(6)
 #define FFCR_STOP_FI           BIT(12)
 
+DEFINE_CORESIGHT_DEVLIST(tpiu_devs, "tpiu");
+
 /**
  * @base:      memory mapped base address for this component.
  * @atclk:     optional clock for the core parts of the TPIU.
@@ -125,6 +127,10 @@ static int tpiu_probe(struct amba_device *adev, const struct amba_id *id)
        struct resource *res = &adev->res;
        struct coresight_desc desc = { 0 };
 
+       desc.name = coresight_alloc_device_name(&tpiu_devs, dev);
+       if (!desc.name)
+               return -ENOMEM;
+
        drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
        if (!drvdata)
                return -ENOMEM;
@@ -157,7 +163,6 @@ static int tpiu_probe(struct amba_device *adev, const struct amba_id *id)
        desc.ops = &tpiu_cs_ops;
        desc.pdata = pdata;
        desc.dev = dev;
-       desc.name = dev_name(dev);
        drvdata->csdev = coresight_register(&desc);
 
        if (!IS_ERR(drvdata->csdev)) {