Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Joe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Suggested-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20250116044907.2947218-1-joe@pf.is.s.u-tokyo.ac.jp
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20250116235339.300485-3-sboyd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Joe Hattori and committed by
Greg Kroah-Hartman
c65b2296 bc32bbd0

-3
-3
drivers/spmi/hisi-spmi-controller.c
··· 300 300 301 301 spin_lock_init(&spmi_controller->lock); 302 302 303 - ctrl->dev.parent = pdev->dev.parent; 304 - ctrl->dev.of_node = of_node_get(pdev->dev.of_node); 305 - 306 303 /* Callbacks */ 307 304 ctrl->read_cmd = spmi_read_cmd; 308 305 ctrl->write_cmd = spmi_write_cmd;