Skip to content

Commit

Permalink
spmi: hisi-spmi-controller: Do not override device identifier
Browse files Browse the repository at this point in the history
[ Upstream commit eda4923 ]

'nr' member of struct spmi_controller, which serves as an identifier
for the controller/bus. This value is a dynamic ID assigned in
spmi_controller_alloc, and overriding it from the driver results in an
ida_free error "ida_free called for id=xx which is not allocated".

Signed-off-by: Vamshi Gajjela <vamshigajjela@google.com>
Fixes: 70f59c9 ("staging: spmi: add Hikey 970 SPMI controller driver")
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20240228185116.1269-1-vamshigajjela@google.com
Signed-off-by: Stephen Boyd <sboyd@kernel.org>
Link: https://lore.kernel.org/r/20240507210809.3479953-5-sboyd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Vamshi Gajjela authored and gregkh committed Jul 5, 2024
1 parent 9055106 commit 6337072
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion drivers/staging/hikey9xx/hisi-spmi-controller.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,6 @@ static int spmi_controller_probe(struct platform_device *pdev)

spin_lock_init(&spmi_controller->lock);

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

Expand Down

0 comments on commit 6337072

Please sign in to comment.