Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 54960
b: refs/heads/master
c: b1e7223
h: refs/heads/master
v: v3
  • Loading branch information
Antonino A. Daplas authored and Linus Torvalds committed May 8, 2007
1 parent 31da0de commit 9fe899e
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 0959f0ca29244ae983b406fba313816a29244be7
refs/heads/master: b1e7223f28b4ed5073d2029a3597bf514ff514f2
29 changes: 15 additions & 14 deletions trunk/drivers/video/fbmem.c
Original file line number Diff line number Diff line change
Expand Up @@ -799,11 +799,11 @@ static int fb_check_caps(struct fb_info *info, struct fb_var_screeninfo *var,
int
fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)
{
int err, flags = info->flags;
int flags = info->flags;
int ret = 0;

if (var->activate & FB_ACTIVATE_INV_MODE) {
struct fb_videomode mode1, mode2;
int ret = 0;

fb_var_to_videomode(&mode1, var);
fb_var_to_videomode(&mode2, &info->var);
Expand All @@ -821,7 +821,9 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)
if (!ret)
fb_delete_videomode(&mode1, &info->modelist);

return ret;

ret = (ret) ? -EINVAL : 0;
goto done;
}

if ((var->activate & FB_ACTIVATE_FORCE) ||
Expand All @@ -830,20 +832,21 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)

if (!info->fbops->fb_check_var) {
*var = info->var;
return 0;
goto done;
}

if ((err = info->fbops->fb_check_var(var, info)))
return err;
ret = info->fbops->fb_check_var(var, info);

if (ret)
goto done;

if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) {
struct fb_videomode mode;
int err = 0;

if (info->fbops->fb_get_caps) {
err = fb_check_caps(info, var, activate);
ret = fb_check_caps(info, var, activate);

if (err)
if (ret)
goto done;
}

Expand All @@ -853,16 +856,14 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)
info->fbops->fb_set_par(info);

fb_pan_display(info, &info->var);

fb_set_cmap(&info->cmap, info);

fb_var_to_videomode(&mode, &info->var);

if (info->modelist.prev && info->modelist.next &&
!list_empty(&info->modelist))
err = fb_add_videomode(&mode, &info->modelist);
ret = fb_add_videomode(&mode, &info->modelist);

if (!err && (flags & FBINFO_MISC_USEREVENT)) {
if (!ret && (flags & FBINFO_MISC_USEREVENT)) {
struct fb_event event;
int evnt = (activate & FB_ACTIVATE_ALL) ?
FB_EVENT_MODE_CHANGE_ALL :
Expand All @@ -876,7 +877,7 @@ fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var)
}

done:
return 0;
return ret;
}

int
Expand Down

0 comments on commit 9fe899e

Please sign in to comment.