diff options
author | Sebastian Andrzej Siewior <[email protected]> | 2021-02-08 23:38:10 +0100 |
---|---|---|
committer | Daniel Vetter <[email protected]> | 2021-02-18 15:14:32 +0100 |
commit | 1b588c82f63ebef55bccac4f0ca9c2825b9a9ae4 (patch) | |
tree | 49f245700954245d981e76d43bf0bd984f0317d1 /drivers/gpu/drm/drm_dp_mst_topology.c | |
parent | 51be84fc4d3a61d8ac7a9a1e5b03da7f1880c2b0 (diff) |
video: fbdev: amba-clcd: Always use msleep() for waiting
The driver uses in_atomic() to distinguish between mdelay() and msleep().
The usage of in_interrupt() in drivers is phased out and Linus clearly
requested that code which changes behaviour depending on context should
either be separated or the context be conveyed in an argument passed by the
caller, which usually knows the context.
I traced the usage of in_interrupt() back to its initial merge:
bfe694f833643 ("[ARM] Add ARM AMBA CLCD framebuffer driver.")
https://git.kernel.org/history/history/c/bfe694f833643
The driver has been removed and added back in the meantime.
I've been looking for the IRQ context as described in the comment and
couldn't find it. The functions calling clcdfb_sleep() also call
conditionally backlight_update_status() which acquires a mutex. If it is
okay to acquire a mutex then it is okay to use msleep() since both
functions must be used in preemptible context.
Replace clcdfb_sleep() with msleep().
Cc: Peter Collingbourne <[email protected]>
Cc: Russell King <[email protected]>
Signed-off-by: Sebastian Andrzej Siewior <[email protected]>
Signed-off-by: Daniel Vetter <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
Diffstat (limited to 'drivers/gpu/drm/drm_dp_mst_topology.c')
0 files changed, 0 insertions, 0 deletions