Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176633
b: refs/heads/master
c: 2cb96f8
h: refs/heads/master
i:
  176631: a506749
v: v3
  • Loading branch information
Andy Shevchenko authored and Linus Torvalds committed Dec 16, 2009
1 parent 7209436 commit 4bba982
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 20 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: 5ab948153a1e409afdc0f78a376ad3710df5b109
refs/heads/master: 2cb96f86628d6e97fcbda5fe4d8d74876239834c
24 changes: 5 additions & 19 deletions trunk/drivers/video/modedb.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@

#include <linux/module.h>
#include <linux/fb.h>
#include <linux/kernel.h>

#undef DEBUG

Expand Down Expand Up @@ -402,21 +403,6 @@ const struct fb_videomode vesa_modes[] = {
EXPORT_SYMBOL(vesa_modes);
#endif /* CONFIG_FB_MODE_HELPERS */

static int my_atoi(const char *name)
{
int val = 0;

for (;; name++) {
switch (*name) {
case '0' ... '9':
val = 10*val+(*name-'0');
break;
default:
return val;
}
}
}

/**
* fb_try_mode - test a video mode
* @var: frame buffer user defined part of display
Expand Down Expand Up @@ -539,7 +525,7 @@ int fb_find_mode(struct fb_var_screeninfo *var,
namelen = i;
if (!refresh_specified && !bpp_specified &&
!yres_specified) {
refresh = my_atoi(&name[i+1]);
refresh = simple_strtol(&name[i+1], NULL, 10);
refresh_specified = 1;
if (cvt || rb)
cvt = 0;
Expand All @@ -549,7 +535,7 @@ int fb_find_mode(struct fb_var_screeninfo *var,
case '-':
namelen = i;
if (!bpp_specified && !yres_specified) {
bpp = my_atoi(&name[i+1]);
bpp = simple_strtol(&name[i+1], NULL, 10);
bpp_specified = 1;
if (cvt || rb)
cvt = 0;
Expand All @@ -558,7 +544,7 @@ int fb_find_mode(struct fb_var_screeninfo *var,
break;
case 'x':
if (!yres_specified) {
yres = my_atoi(&name[i+1]);
yres = simple_strtol(&name[i+1], NULL, 10);
yres_specified = 1;
} else
goto done;
Expand Down Expand Up @@ -586,7 +572,7 @@ int fb_find_mode(struct fb_var_screeninfo *var,
}
}
if (i < 0 && yres_specified) {
xres = my_atoi(name);
xres = simple_strtol(name, NULL, 10);
res_specified = 1;
}
done:
Expand Down

0 comments on commit 4bba982

Please sign in to comment.