linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: s.nawrocki@samsung.com (Sylwester Nawrocki)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/3] [media] s5p-jpeg: Fix compilation with COMPILE_TEST
Date: Tue, 09 Sep 2014 16:58:58 +0200	[thread overview]
Message-ID: <540F15B2.3000902@samsung.com> (raw)
In-Reply-To: <b7343e6296b5d1d68b7229b8307442fd4141bcb3.1410273306.git.m.chehab@samsung.com>

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 <sfr@canb.auug.org.au>
> Signed-off-by: Mauro Carvalho Chehab <m.chehab@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 ?

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

--
Regards,
Sylwester

  reply	other threads:[~2014-09-09 14:58 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20140909124306.2d5a0d76@canb.auug.org.au>
     [not found] ` <6cbd00c5f2d342b573aaf9c0e533778374dd2e1e.1410273306.git.m.chehab@samsung.com>
2014-09-09 14:38   ` [PATCH 2/3] [media] s5p-jpeg: Fix compilation with COMPILE_TEST Mauro Carvalho Chehab
2014-09-09 14:58     ` Sylwester Nawrocki [this message]
2014-09-09 15:09       ` Mauro Carvalho Chehab
2014-09-09 15:30         ` Jacek Anaszewski
2014-09-09 16:10           ` [PATCHv2 " Mauro Carvalho Chehab
2014-09-09 17:10             ` Sylwester Nawrocki
2014-09-09 17:19             ` Fabio Estevam
2014-09-09 17:54         ` [PATCH " Arnd Bergmann
2014-09-09 18:40           ` Mauro Carvalho Chehab
     [not found]   ` <5f850d5d45a27c50dabf3da08689cbedf986841b.1410288748.git.m.chehab@samsung.com>
2014-09-09 18:54     ` [PATCHv3 " Mauro Carvalho Chehab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=540F15B2.3000902@samsung.com \
    --to=s.nawrocki@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).