X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=drivers%2Fvideo%2Fda8xx-fb.c;h=5fb68865ef4631adffba5be54598ed35ef6d2360;hb=7c351ff5e0e50359d9feb49272650bd01417f721;hp=6ec4f89e346d357892b31492e72645670a55004b;hpb=2d5e6b4aac59d3a93773f19839fbb86d9e704fb7;p=oweals%2Fu-boot.git diff --git a/drivers/video/da8xx-fb.c b/drivers/video/da8xx-fb.c index 6ec4f89e34..5fb68865ef 100644 --- a/drivers/video/da8xx-fb.c +++ b/drivers/video/da8xx-fb.c @@ -1,3 +1,4 @@ +// SPDX-License-Identifier: GPL-2.0+ /* * Porting to u-boot: * @@ -9,11 +10,10 @@ * * Based on the LCD driver for TI Avalanche processors written by * Ajay Singh and Shalom Hai. - * - * SPDX-License-Identifier: GPL-2.0+ */ #include +#include #include #include #include @@ -853,9 +853,10 @@ static u32 wait_for_event(u32 event) do { ret = lcdc_irq_handler(); 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); return -1; }