diff options
Diffstat (limited to 'drivers/media/video/ivtv/ivtvfb.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtvfb.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/media/video/ivtv/ivtvfb.c b/drivers/media/video/ivtv/ivtvfb.c index 14f93341f061..bdfda48e56bf 100644 --- a/drivers/media/video/ivtv/ivtvfb.c +++ b/drivers/media/video/ivtv/ivtvfb.c | |||
@@ -417,10 +417,11 @@ static ssize_t ivtvfb_write(struct fb_info *info, const char __user *buf, | |||
417 | if (!err) { | 417 | if (!err) { |
418 | /* If transfer size > threshold and both src/dst | 418 | /* If transfer size > threshold and both src/dst |
419 | addresses are aligned, use DMA */ | 419 | addresses are aligned, use DMA */ |
420 | if (count >= 4096 && ((u32)buf & 3) == ((u32)dst & 3)) { | 420 | if (count >= 4096 && |
421 | ((unsigned long)buf & 3) == ((unsigned long)dst & 3)) { | ||
421 | /* Odd address = can't DMA. Align */ | 422 | /* Odd address = can't DMA. Align */ |
422 | if ((u32)dst & 3) { | 423 | if ((unsigned long)dst & 3) { |
423 | lead = 4 - ((u32)dst & 3); | 424 | lead = 4 - ((unsigned long)dst & 3); |
424 | memcpy(dst, buf, lead); | 425 | memcpy(dst, buf, lead); |
425 | buf += lead; | 426 | buf += lead; |
426 | dst += lead; | 427 | dst += lead; |