Skip to content

Commit 7269d76

Browse files
committed
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 <[email protected]> * 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
2 parents 7254a29 + 2e5657a commit 7269d76

File tree

4 files changed

+7
-6
lines changed

4 files changed

+7
-6
lines changed

drivers/hwtracing/coresight/coresight-platform.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ static int of_get_coresight_platform_data(struct device *dev,
275275
*/
276276
if (!parent) {
277277
/*
278-
* Avoid warnings in of_graph_get_next_endpoint()
278+
* Avoid warnings in for_each_endpoint_of_node()
279279
* if the device doesn't have any graph connections
280280
*/
281281
if (!of_graph_is_present(node))
@@ -286,7 +286,7 @@ static int of_get_coresight_platform_data(struct device *dev,
286286
}
287287

288288
/* Iterate through each output port to discover topology */
289-
while ((ep = of_graph_get_next_endpoint(parent, ep))) {
289+
for_each_endpoint_of_node(parent, ep) {
290290
/*
291291
* Legacy binding mixes input/output ports under the
292292
* 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,
297297
continue;
298298

299299
ret = of_coresight_parse_endpoint(dev, ep, pdata);
300-
if (ret)
300+
if (ret) {
301+
of_node_put(ep);
301302
return ret;
303+
}
302304
}
303305

304306
return 0;

drivers/hwtracing/coresight/coresight-priv.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <linux/pm_runtime.h>
1414

1515
extern struct mutex coresight_mutex;
16-
extern struct device_type coresight_dev_type[];
16+
extern const struct device_type coresight_dev_type[];
1717

1818
/*
1919
* Coresight management registers (0xf00-0xfcc)

drivers/hwtracing/coresight/coresight-sysfs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ static struct attribute *coresight_source_attrs[] = {
377377
};
378378
ATTRIBUTE_GROUPS(coresight_source);
379379

380-
struct device_type coresight_dev_type[] = {
380+
const struct device_type coresight_dev_type[] = {
381381
[CORESIGHT_DEV_TYPE_SINK] = {
382382
.name = "sink",
383383
.groups = coresight_sink_groups,

drivers/hwtracing/coresight/coresight-tmc-core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include <linux/coresight.h>
2727
#include <linux/amba/bus.h>
2828
#include <linux/platform_device.h>
29-
#include <linux/acpi.h>
3029

3130
#include "coresight-priv.h"
3231
#include "coresight-tmc.h"

0 commit comments

Comments
 (0)