Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit df4ae340 authored by Karthikeyan Ramasubramanian's avatar Karthikeyan Ramasubramanian
Browse files

drivers: of: of_slimbus: Register the slimbus slaves that are enabled



Currently all the child nodes of slimbus controller are registered even if
they are disabled. This leads to slimbus slave drivers getting probed even
if the slimbus slave devices are enabled.

Use for_each_available_child_of_node helper function to register only the
nodes that are enabled.

Change-Id: I930f5bf2ee4ddef7f74521bf3e8cc444b75f86e6
Signed-off-by: default avatarKarthikeyan Ramasubramanian <kramasub@codeaurora.org>
parent 6401e390
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
/* Copyright (c) 2012, 2017 The Linux Foundation. All rights reserved.
/* Copyright (c) 2012, 2017-2018 The Linux Foundation. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
@@ -29,7 +29,7 @@ int of_register_slim_devices(struct slim_controller *ctrl)
	if (!ctrl->dev.of_node)
		return -EINVAL;

	for_each_child_of_node(ctrl->dev.of_node, node) {
	for_each_available_child_of_node(ctrl->dev.of_node, node) {
		struct property *prop;
		struct slim_device *slim;
		char *name;