]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
spmi: hisi-spmi-controller: Drop duplicated OF node assignment in spmi_controller_probe()
authorJoe Hattori <joe@pf.is.s.u-tokyo.ac.jp>
Thu, 16 Jan 2025 23:53:38 +0000 (15:53 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 17 Jan 2025 11:58:49 +0000 (12:58 +0100)
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>
drivers/spmi/hisi-spmi-controller.c

index 3cafdf22c9094b41cced658abffad80f9bf43405..122140b975793ba4a271a5da903e12a78d4c13a5 100644 (file)
@@ -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;