Re: GMA500: ERROR: "__bad_udelay" undefined!

From: Arnd Bergmann
Date: Mon Jul 25 2011 - 17:09:01 EST


On Monday 25 July 2011 11:28:44 Ryan Mallon wrote:
>
> diff --git a/drivers/staging/gma500/psb_intel_display.c b/drivers/staging/gma500/psb_intel_display.c
> index 4f47d09..09e378d 100644
> --- a/drivers/staging/gma500/psb_intel_display.c
> +++ b/drivers/staging/gma500/psb_intel_display.c
> @@ -331,7 +331,7 @@ static bool psb_intel_find_best_PLL(struct drm_crtc *crtc, int target,
> void psb_intel_wait_for_vblank(struct drm_device *dev)
> {
> /* Wait for 20ms, i.e. one cycle at 50hz. */
> - udelay(20000);
> + mdelay(20);
> }
>
> int psb_intel_pipe_set_base(struct drm_crtc *crtc,

A 20 ms busy wait is rather nasty. Can't this be replaced with a sleeping
wait (msleep)?

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