]> git.karo-electronics.de Git - linux-beck.git/commitdiff
[media] s5p-jpeg: Fix compilation with COMPILE_TEST
authorMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 9 Sep 2014 14:21:30 +0000 (11:21 -0300)
committerMauro Carvalho Chehab <m.chehab@samsung.com>
Tue, 9 Sep 2014 21:08:07 +0000 (18:08 -0300)
ERROR: "__bad_ndelay" [drivers/media/platform/s5p-jpeg/s5p-jpeg.ko] undefined!

That happens because asm-generic doesn't like any ndelay time
bigger than 20us.

Currently, usleep_range() couldn't simply be used, since
exynos4_jpeg_sw_reset() is called with a spinlock held.

So, let's use udelay() instead.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c

index e51c078360f5a36b921e50a892ff003bad952ca0..ab6d6f43c96f1a81361a98b7acc6faa160e368d1 100644 (file)
@@ -23,7 +23,7 @@ void exynos4_jpeg_sw_reset(void __iomem *base)
        reg = readl(base + EXYNOS4_JPEG_CNTL_REG);
        writel(reg & ~EXYNOS4_SOFT_RESET_HI, base + EXYNOS4_JPEG_CNTL_REG);
 
-       ndelay(100000);
+       udelay(100);
 
        writel(reg | EXYNOS4_SOFT_RESET_HI, base + EXYNOS4_JPEG_CNTL_REG);
 }