Skip to content

Commit 181b66e

Browse files
konradybcioandersson
authored andcommitted
clk: qcom: reset: Use the correct type of sleep/delay based on length
Use the fsleep() helper that (based on the length of the delay, see: [1]) chooses the correct sleep/delay functions. [1] https://www.kernel.org/doc/Documentation/timers/timers-howto.txt Fixes: 2cb8a39 ("clk: qcom: reset: Allow specifying custom reset delay") Signed-off-by: Konrad Dybcio <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent b6bcd1c commit 181b66e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

drivers/clk/qcom/reset.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ static int qcom_reset(struct reset_controller_dev *rcdev, unsigned long id)
1616
struct qcom_reset_controller *rst = to_qcom_reset_controller(rcdev);
1717

1818
rcdev->ops->assert(rcdev, id);
19-
udelay(rst->reset_map[id].udelay ?: 1); /* use 1 us as default */
19+
fsleep(rst->reset_map[id].udelay ?: 1); /* use 1 us as default */
20+
2021
rcdev->ops->deassert(rcdev, id);
2122
return 0;
2223
}

0 commit comments

Comments
 (0)