mirror of
https://github.com/torvalds/linux.git
synced 2026-07-31 03:27:03 +02:00
coresight: etm4x: Fetch device name in sysfs from device tree
If coresight-name exists in etm/ete nodes, use coresight-name value as device name. Change-Id: I1297241d8ddc2b29f8745ed33ed5b2089f6b0bcb Signed-off-by: Mao Jinlong <jinlmao@codeaurora.org> Signed-off-by: Tao Zhang <quic_taozha@quicinc.com> Signed-off-by: Mao Jinlong <quic_jinlmao@quicinc.com>
This commit is contained in:
parent
3a0a1539ac
commit
91ab668fcf
|
|
@ -26,6 +26,7 @@
|
|||
#include <linux/amba/bus.h>
|
||||
#include <linux/seq_file.h>
|
||||
#include <linux/uaccess.h>
|
||||
#include <linux/of.h>
|
||||
#include <linux/perf_event.h>
|
||||
#include <linux/platform_device.h>
|
||||
#include <linux/pm_runtime.h>
|
||||
|
|
@ -1966,7 +1967,8 @@ static int etm4_probe(struct device *dev, void __iomem *base, u32 etm_pid)
|
|||
type_name = "etm";
|
||||
}
|
||||
|
||||
desc.name = devm_kasprintf(dev, GFP_KERNEL,
|
||||
if (of_property_read_string(dev->of_node, "coresight-name", &desc.name))
|
||||
desc.name = devm_kasprintf(dev, GFP_KERNEL,
|
||||
"%s%d", type_name, drvdata->cpu);
|
||||
if (!desc.name)
|
||||
return -ENOMEM;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user