drivers/gpu/drm/radeon/atom.c: fix warning
authorAndrew Morton <akpm@linux-foundation.org>
Mon, 23 May 2011 21:48:32 +0000 (14:48 -0700)
committerDave Airlie <airlied@redhat.com>
Mon, 23 May 2011 23:00:37 +0000 (09:00 +1000)
udelay() doesn't like 8-bit arguments:

drivers/gpu/drm/radeon/atom.c: In function 'atom_op_delay':
drivers/gpu/drm/radeon/atom.c:653: warning: comparison is always false due to limited range of data type

while we're there, use msleep() rather than open-coding it.

Cc: David Airlie <airlied@linux.ie>
Reviewed-by: Alex Deucher <alexdeucher@gmail.com>
Cc: Matt Turner <mattst88@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/radeon/atom.c

index 7bd7456890974025c74bfce11f8516bad909eacf..ebdb0fdb8348ad7b217e3d46027207789e0ad67f 100644 (file)
@@ -652,12 +652,12 @@ static void atom_op_compare(atom_exec_context *ctx, int *ptr, int arg)
 
 static void atom_op_delay(atom_exec_context *ctx, int *ptr, int arg)
 {
-       uint8_t count = U8((*ptr)++);
+       unsigned count = U8((*ptr)++);
        SDEBUG("   count: %d\n", count);
        if (arg == ATOM_UNIT_MICROSEC)
                udelay(count);
        else
-               schedule_timeout_uninterruptible(msecs_to_jiffies(count));
+               msleep(count);
 }
 
 static void atom_op_div(atom_exec_context *ctx, int *ptr, int arg)