]> Git Repo - linux.git/commitdiff
spmi: hisi-spmi-controller: Drop duplicated OF node assignment in spmi_controller_probe()
authorJoe Hattori <[email protected]>
Thu, 16 Jan 2025 23:53:38 +0000 (15:53 -0800)
committerGreg Kroah-Hartman <[email protected]>
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 <[email protected]>
Suggested-by: Stephen Boyd <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Stephen Boyd <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected]>
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;
This page took 0.056398 seconds and 4 git commands to generate.