aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorVille Syrjala <syrjala@sci.fi>2008-07-23 21:31:28 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2008-07-24 10:47:39 -0700
commit7572a1ea034a8fc45e57de28cc7573264975532a (patch)
tree4d2850fd511ca4aa93dc8c0994f8460c6e35eadb /drivers
parent43a3abc6aca8505e708508e2c7c2f99a7f8f820b (diff)
fbdev: xoffset, yoffset and yres are unsigned
The xoffset, yoffset and yres members of fb_var_screeninfo are __u32. Make them unsigned in the code as well. Signed-off-by: Ville Syrjala <syrjala@sci.fi> Cc: "Antonino A. Daplas" <adaplas@pol.net> Cc: Krzysztof Helt <krzysztof.h1@poczta.fm> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/video/fbmem.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c
index 1cd5071e536..6b487801eea 100644
--- a/drivers/video/fbmem.c
+++ b/drivers/video/fbmem.c
@@ -848,9 +848,8 @@ int
fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var)
{
struct fb_fix_screeninfo *fix = &info->fix;
- int xoffset = var->xoffset;
- int yoffset = var->yoffset;
- int err = 0, yres = info->var.yres;
+ unsigned int yres = info->var.yres;
+ int err = 0;
if (var->yoffset > 0) {
if (var->vmode & FB_VMODE_YWRAP) {
@@ -866,8 +865,8 @@ fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var)
(var->xoffset % fix->xpanstep)))
err = -EINVAL;
- if (err || !info->fbops->fb_pan_display || xoffset < 0 ||
- yoffset < 0 || var->yoffset + yres > info->var.yres_virtual ||
+ if (err || !info->fbops->fb_pan_display ||
+ var->yoffset + yres > info->var.yres_virtual ||
var->xoffset + info->var.xres > info->var.xres_virtual)
return -EINVAL;