mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-29 08:00:26 +09:00
video, da8xx-fb: fix time out in wait_for_event()
If an event does not occur the current coding stays in an endless loop. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
This commit is contained in:
parent
348f044fda
commit
c16b342d90
@ -853,9 +853,10 @@ static u32 wait_for_event(u32 event)
|
|||||||
do {
|
do {
|
||||||
ret = lcdc_irq_handler();
|
ret = lcdc_irq_handler();
|
||||||
udelay(1000);
|
udelay(1000);
|
||||||
} while (!(ret & event));
|
--timeout;
|
||||||
|
} while (!(ret & event) && timeout);
|
||||||
|
|
||||||
if (timeout <= 0) {
|
if (!(ret & event)) {
|
||||||
printf("%s: event %d not hit\n", __func__, event);
|
printf("%s: event %d not hit\n", __func__, event);
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user