diff options
author | Ville Syrjala <syrjala@sci.fi> | 2008-07-24 00:31:28 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-24 13:47:39 -0400 |
commit | 7572a1ea034a8fc45e57de28cc7573264975532a (patch) | |
tree | 4d2850fd511ca4aa93dc8c0994f8460c6e35eadb /drivers/video | |
parent | 43a3abc6aca8505e708508e2c7c2f99a7f8f820b (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/video')
-rw-r--r-- | drivers/video/fbmem.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 1cd5071e5362..6b487801eeae 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c | |||
@@ -848,9 +848,8 @@ int | |||
848 | fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var) | 848 | fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var) |
849 | { | 849 | { |
850 | struct fb_fix_screeninfo *fix = &info->fix; | 850 | struct fb_fix_screeninfo *fix = &info->fix; |
851 | int xoffset = var->xoffset; | 851 | unsigned int yres = info->var.yres; |
852 | int yoffset = var->yoffset; | 852 | int err = 0; |
853 | int err = 0, yres = info->var.yres; | ||
854 | 853 | ||
855 | if (var->yoffset > 0) { | 854 | if (var->yoffset > 0) { |
856 | if (var->vmode & FB_VMODE_YWRAP) { | 855 | if (var->vmode & FB_VMODE_YWRAP) { |
@@ -866,8 +865,8 @@ fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var) | |||
866 | (var->xoffset % fix->xpanstep))) | 865 | (var->xoffset % fix->xpanstep))) |
867 | err = -EINVAL; | 866 | err = -EINVAL; |
868 | 867 | ||
869 | if (err || !info->fbops->fb_pan_display || xoffset < 0 || | 868 | if (err || !info->fbops->fb_pan_display || |
870 | yoffset < 0 || var->yoffset + yres > info->var.yres_virtual || | 869 | var->yoffset + yres > info->var.yres_virtual || |
871 | var->xoffset + info->var.xres > info->var.xres_virtual) | 870 | var->xoffset + info->var.xres > info->var.xres_virtual) |
872 | return -EINVAL; | 871 | return -EINVAL; |
873 | 872 | ||