diff options
author | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-07-03 15:50:32 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-07-03 15:50:32 +0200 |
commit | 7269d767245651ea4b99b6ed6ff0137f42bc53f7 (patch) | |
tree | 8ce6ea1cd7ba72527535610ab8b413a0ae185be2 | |
parent | 7254a298cfa7127d39acef9ca5d5d8f26f822c50 (diff) | |
parent | 2e5657aa59669698f0f3bf7742d83577a18eb830 (diff) | |
download | linux-stable-7269d767245651ea4b99b6ed6ff0137f42bc53f7.tar.gz linux-stable-7269d767245651ea4b99b6ed6ff0137f42bc53f7.tar.bz2 linux-stable-7269d767245651ea4b99b6ed6ff0137f42bc53f7.zip |
Merge tag 'coresight-next-v6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/coresight/linux into char-misc-next
Suzuki writes:
coresight: Updates for v6.11
Coresight/hwtracing subsystem updates targeting v6.11 includes a few minor
fixes and cleanups
Signed-off-by: Suzuki K Poulose <suzuki.poulose@arm.com>
* tag 'coresight-next-v6.11' of ssh://gitolite.kernel.org/pub/scm/linux/kernel/git/coresight/linux:
hwtracing: use for_each_endpoint_of_node()
coresight: constify the struct device_type usage
coresight: tmc: Remove duplicated include in coresight-tmc-core.c
coresight: Fix ref leak when of_coresight_parse_endpoint() fails
-rw-r--r-- | drivers/hwtracing/coresight/coresight-platform.c | 8 | ||||
-rw-r--r-- | drivers/hwtracing/coresight/coresight-priv.h | 2 | ||||
-rw-r--r-- | drivers/hwtracing/coresight/coresight-sysfs.c | 2 | ||||
-rw-r--r-- | drivers/hwtracing/coresight/coresight-tmc-core.c | 1 |
4 files changed, 7 insertions, 6 deletions
diff --git a/drivers/hwtracing/coresight/coresight-platform.c b/drivers/hwtracing/coresight/coresight-platform.c index 9d550f5697fa..64e171eaad82 100644 --- a/drivers/hwtracing/coresight/coresight-platform.c +++ b/drivers/hwtracing/coresight/coresight-platform.c @@ -275,7 +275,7 @@ static int of_get_coresight_platform_data(struct device *dev, */ if (!parent) { /* - * Avoid warnings in of_graph_get_next_endpoint() + * Avoid warnings in for_each_endpoint_of_node() * if the device doesn't have any graph connections */ if (!of_graph_is_present(node)) @@ -286,7 +286,7 @@ static int of_get_coresight_platform_data(struct device *dev, } /* Iterate through each output port to discover topology */ - while ((ep = of_graph_get_next_endpoint(parent, ep))) { + for_each_endpoint_of_node(parent, ep) { /* * Legacy binding mixes input/output ports under the * same parent. So, skip the input ports if we are dealing @@ -297,8 +297,10 @@ static int of_get_coresight_platform_data(struct device *dev, continue; ret = of_coresight_parse_endpoint(dev, ep, pdata); - if (ret) + if (ret) { + of_node_put(ep); return ret; + } } return 0; diff --git a/drivers/hwtracing/coresight/coresight-priv.h b/drivers/hwtracing/coresight/coresight-priv.h index fc3617642b01..61a46d3bdcc8 100644 --- a/drivers/hwtracing/coresight/coresight-priv.h +++ b/drivers/hwtracing/coresight/coresight-priv.h @@ -13,7 +13,7 @@ #include <linux/pm_runtime.h> extern struct mutex coresight_mutex; -extern struct device_type coresight_dev_type[]; +extern const struct device_type coresight_dev_type[]; /* * Coresight management registers (0xf00-0xfcc) diff --git a/drivers/hwtracing/coresight/coresight-sysfs.c b/drivers/hwtracing/coresight/coresight-sysfs.c index f9444e2cb1d9..1e67cc7758d7 100644 --- a/drivers/hwtracing/coresight/coresight-sysfs.c +++ b/drivers/hwtracing/coresight/coresight-sysfs.c @@ -377,7 +377,7 @@ static struct attribute *coresight_source_attrs[] = { }; ATTRIBUTE_GROUPS(coresight_source); -struct device_type coresight_dev_type[] = { +const struct device_type coresight_dev_type[] = { [CORESIGHT_DEV_TYPE_SINK] = { .name = "sink", .groups = coresight_sink_groups, diff --git a/drivers/hwtracing/coresight/coresight-tmc-core.c b/drivers/hwtracing/coresight/coresight-tmc-core.c index 4f11a739ae4d..b54562f392f3 100644 --- a/drivers/hwtracing/coresight/coresight-tmc-core.c +++ b/drivers/hwtracing/coresight/coresight-tmc-core.c @@ -26,7 +26,6 @@ #include <linux/coresight.h> #include <linux/amba/bus.h> #include <linux/platform_device.h> -#include <linux/acpi.h> #include "coresight-priv.h" #include "coresight-tmc.h" |