diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2011-05-23 17:48:32 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2011-05-23 19:00:37 -0400 |
commit | 2ec8a5feaf3000bf4f9744d0caad0d5f12ce1409 (patch) | |
tree | 6a908fca57ff91b138302d9434b649250926fd3b | |
parent | d19c37a5809cd425caf989d45eb5e5eb68d17d99 (diff) |
drivers/gpu/drm/radeon/atom.c: fix warning
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>
-rw-r--r-- | drivers/gpu/drm/radeon/atom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/radeon/atom.c b/drivers/gpu/drm/radeon/atom.c index 7bd745689097..ebdb0fdb8348 100644 --- a/drivers/gpu/drm/radeon/atom.c +++ b/drivers/gpu/drm/radeon/atom.c | |||
@@ -652,12 +652,12 @@ static void atom_op_compare(atom_exec_context *ctx, int *ptr, int arg) | |||
652 | 652 | ||
653 | static void atom_op_delay(atom_exec_context *ctx, int *ptr, int arg) | 653 | static void atom_op_delay(atom_exec_context *ctx, int *ptr, int arg) |
654 | { | 654 | { |
655 | uint8_t count = U8((*ptr)++); | 655 | unsigned count = U8((*ptr)++); |
656 | SDEBUG(" count: %d\n", count); | 656 | SDEBUG(" count: %d\n", count); |
657 | if (arg == ATOM_UNIT_MICROSEC) | 657 | if (arg == ATOM_UNIT_MICROSEC) |
658 | udelay(count); | 658 | udelay(count); |
659 | else | 659 | else |
660 | schedule_timeout_uninterruptible(msecs_to_jiffies(count)); | 660 | msleep(count); |
661 | } | 661 | } |
662 | 662 | ||
663 | static void atom_op_div(atom_exec_context *ctx, int *ptr, int arg) | 663 | static void atom_op_div(atom_exec_context *ctx, int *ptr, int arg) |