]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
gpu: drm: bridge: adv7511: Replace mdelay with usleep_range in adv7511_probe
authorJia-Ju Bai <baijiaju1990@gmail.com>
Wed, 11 Apr 2018 08:33:42 +0000 (16:33 +0800)
committerArchit Taneja <architt@codeaurora.org>
Fri, 4 May 2018 06:00:51 +0000 (11:30 +0530)
commit5f27314141757794378abb2907fb7116947d644b
tree0da12905fd75f9d47119520c545d40c00758d4f7
parent7bd2d2ecedff26b3a87b026b98acc4b7110c9ee6
gpu: drm: bridge: adv7511: Replace mdelay with usleep_range in adv7511_probe

adv7511_probe() is never called in atomic context.
This function is only set as ".probe" in struct i2c_driver.

Despite never getting called from atomic context, adv7511_probe()
calls mdelay() to busily wait.
This is not necessary and can be replaced with usleep_range() to
avoid busy waiting.

This is found by a static analysis tool named DCNS written by myself.
And I also manually check it.

Signed-off-by: Jia-Ju Bai <baijiaju1990@gmail.com>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Archit Taneja <architt@codeaurora.org>
Link: https://patchwork.freedesktop.org/patch/msgid/1523435622-4329-1-git-send-email-baijiaju1990@gmail.com
drivers/gpu/drm/bridge/adv7511/adv7511_drv.c