Commit c65b2296 authored by Joe Hattori's avatar Joe Hattori Committed by Greg Kroah-Hartman
Browse files

spmi: hisi-spmi-controller: Drop duplicated OF node assignment in spmi_controller_probe()



spmi_controller_probe() assigns a parent device and an OF node to an
SPMI controller. However, the operations are not needed as they are
already assigned in spmi_controller_alloc(). Thus, remove the duplicated
assignments. An unnecessary OF node reference acquisition is also
dropped by this patch.

Signed-off-by: default avatarJoe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Suggested-by: default avatarStephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20250116044907.2947218-1-joe@pf.is.s.u-tokyo.ac.jp


Signed-off-by: default avatarStephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20250116235339.300485-3-sboyd@kernel.org


Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent bc32bbd0
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -300,9 +300,6 @@ static int spmi_controller_probe(struct platform_device *pdev)

	spin_lock_init(&spmi_controller->lock);

	ctrl->dev.parent = pdev->dev.parent;
	ctrl->dev.of_node = of_node_get(pdev->dev.of_node);

	/* Callbacks */
	ctrl->read_cmd = spmi_read_cmd;
	ctrl->write_cmd = spmi_write_cmd;