Skip to content

Commit

Permalink
spmi: hisi-spmi-controller: Drop duplicated OF node assignment in spm…
Browse files Browse the repository at this point in the history
…i_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 <[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]>
  • Loading branch information
joehattori authored and gregkh committed Jan 17, 2025
1 parent bc32bbd commit c65b229
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions drivers/spmi/hisi-spmi-controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c65b229

Please sign in to comment.