提交 08215f81 编写于 作者: T Tony Lindgren 提交者: Zheng Zengkai

bus: ti-sysc: Fix warning on unbind if reset is not deasserted

stable inclusion
from stable-5.10.29
commit 4c875e034dfb25d121c475a7b941a85d9a9d9624
bugzilla: 51789

--------------------------------

[ Upstream commit a7b5d7c4 ]

We currently get thefollowing on driver unbind if a reset is configured
and asserted:

WARNING: CPU: 0 PID: 993 at drivers/reset/core.c:432 reset_control_assert
...
(reset_control_assert) from [<c0fecda8>] (sysc_remove+0x190/0x1e4)
(sysc_remove) from [<c0a2bb58>] (platform_remove+0x24/0x3c)
(platform_remove) from [<c0a292fc>] (__device_release_driver+0x154/0x214)
(__device_release_driver) from [<c0a2a210>] (device_driver_detach+0x3c/0x8c)
(device_driver_detach) from [<c0a27d64>] (unbind_store+0x60/0xd4)
(unbind_store) from [<c0546bec>] (kernfs_fop_write_iter+0x10c/0x1cc)

Let's fix it by checking the reset status.
Signed-off-by: NTony Lindgren <tony@atomide.com>
Signed-off-by: NSasha Levin <sashal@kernel.org>
Signed-off-by: NChen Jun <chenjun102@huawei.com>
Acked-by: N  Weilong Chen <chenweilong@huawei.com>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
上级 2e70fa8e
...@@ -3044,6 +3044,8 @@ static int sysc_remove(struct platform_device *pdev) ...@@ -3044,6 +3044,8 @@ static int sysc_remove(struct platform_device *pdev)
pm_runtime_put_sync(&pdev->dev); pm_runtime_put_sync(&pdev->dev);
pm_runtime_disable(&pdev->dev); pm_runtime_disable(&pdev->dev);
if (!reset_control_status(ddata->rsts))
reset_control_assert(ddata->rsts); reset_control_assert(ddata->rsts);
unprepare: unprepare:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册