Em Tue, 09 Sep 2014 16:58:58 +0200
Sylwester Nawrocki <s.nawro...@samsung.com> escreveu:

> On 09/09/14 16:38, Mauro Carvalho Chehab wrote:
> > ERROR: "__bad_ndelay" [drivers/media/platform/s5p-jpeg/s5p-jpeg.ko] 
> > undefined!
> > 
> > Yet, it sounds a bad idea to use ndelay to wait for 100 us
> > for the device to reset.
> > 
> > Reported-by: Stephen Rothwell <s...@canb.auug.org.au>
> > Signed-off-by: Mauro Carvalho Chehab <m.che...@samsung.com>
> > 
> > diff --git a/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c 
> > b/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c
> > index e51c078360f5..01eeacf28843 100644
> > --- a/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c
> > +++ b/drivers/media/platform/s5p-jpeg/jpeg-hw-exynos4.c
> > @@ -23,7 +23,9 @@ 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);
> >  
> > +#ifndef CONFIG_COMPILE_TEST
> >     ndelay(100000);
> > +#endif
> 
> Wouldn't be a better fix to replace ndelay(100000); with udelay(100),
> rather than sticking in a not so pretty #ifndef ?

Works for me. I'll submit a new version.

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

Ok.

Regards,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to