summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/bridge
diff options
context:
space:
mode:
authorJia-Ju Bai <baijiaju1990@gmail.com>2018-04-11 16:33:42 +0800
committerArchit Taneja <architt@codeaurora.org>2018-05-04 11:30:51 +0530
commit5f27314141757794378abb2907fb7116947d644b (patch)
tree0da12905fd75f9d47119520c545d40c00758d4f7 /drivers/gpu/drm/bridge
parent7bd2d2ecedff26b3a87b026b98acc4b7110c9ee6 (diff)
downloadblackbird-obmc-linux-5f27314141757794378abb2907fb7116947d644b.tar.gz
blackbird-obmc-linux-5f27314141757794378abb2907fb7116947d644b.zip
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
Diffstat (limited to 'drivers/gpu/drm/bridge')
-rw-r--r--drivers/gpu/drm/bridge/adv7511/adv7511_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
index 2614cea538e2..73021b388e12 100644
--- a/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
+++ b/drivers/gpu/drm/bridge/adv7511/adv7511_drv.c
@@ -1127,7 +1127,7 @@ static int adv7511_probe(struct i2c_client *i2c, const struct i2c_device_id *id)
}
if (adv7511->gpio_pd) {
- mdelay(5);
+ usleep_range(5000, 6000);
gpiod_set_value_cansleep(adv7511->gpio_pd, 0);
}
OpenPOWER on IntegriCloud