Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 185491
b: refs/heads/master
c: 3b40a44
h: refs/heads/master
i:
  185489: 01d1040
  185487: e6de337
v: v3
  • Loading branch information
Andy Shevchenko authored and Dave Airlie committed Feb 11, 2010
1 parent 6c600dd commit f831ada
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: 9a1420d1185693b6e24719d3937a0c20a3e0e31d
refs/heads/master: 3b40a4434f4d65321332dec590a079d7a75077d8
24 changes: 5 additions & 19 deletions trunk/drivers/gpu/drm/drm_fb_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
* Dave Airlie <airlied@linux.ie>
* Jesse Barnes <jesse.barnes@intel.com>
*/
#include <linux/kernel.h>
#include <linux/sysrq.h>
#include <linux/fb.h>
#include "drmP.h"
Expand All @@ -50,21 +51,6 @@ int drm_fb_helper_add_connector(struct drm_connector *connector)
}
EXPORT_SYMBOL(drm_fb_helper_add_connector);

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;
}
}
}

/**
* drm_fb_helper_connector_parse_command_line - parse command line for connector
* @connector - connector to parse line for
Expand Down Expand Up @@ -111,7 +97,7 @@ static bool drm_fb_helper_connector_parse_command_line(struct drm_connector *con
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 @@ -121,7 +107,7 @@ static bool drm_fb_helper_connector_parse_command_line(struct drm_connector *con
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 @@ -130,7 +116,7 @@ static bool drm_fb_helper_connector_parse_command_line(struct drm_connector *con
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 @@ -170,7 +156,7 @@ static bool drm_fb_helper_connector_parse_command_line(struct drm_connector *con
}
}
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 f831ada

Please sign in to comment.