video: fbdev: aty: radeon_pm: Replace mdelay with msleep in radeonfb_pci_suspend
authorJia-Ju Bai <baijiaju1990@gmail.com>
Tue, 24 Apr 2018 16:11:21 +0000 (18:11 +0200)
committerBartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Tue, 24 Apr 2018 16:11:21 +0000 (18:11 +0200)
commitde11731278712e0f8b12a2539aa2958ca95200c3
treee7de080557302d3807ad18c79a031f5a15c17226
parent86c4e7c350a5bd116ff4b9cea2c75a4a4ae321ff
video: fbdev: aty: radeon_pm: Replace mdelay with msleep in radeonfb_pci_suspend

radeonfb_pci_suspend() is never called in atomic context.

radeonfb_pci_suspend() is only set as ".suspend" in struct pci_driver.
This function is not called in atomic context.

Despite never getting called from atomic context, radeonfb_pci_suspend()
calls mdelay() to busily wait.
This is not necessary and can be replaced with msleep()
and 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>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
drivers/video/fbdev/aty/radeon_pm.c