Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 174012
b: refs/heads/master
c: 2d8d776
h: refs/heads/master
v: v3
  • Loading branch information
Andy Shevchenko authored and Mauro Carvalho Chehab committed Dec 5, 2009
1 parent 79bdd0c commit 932dde8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 17 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: e67e376b1e50b60238410893971c5e6c4dd19ef1
refs/heads/master: 2d8d7762d75d36a08a4a5c3d3f1c301f76cb8f56
23 changes: 7 additions & 16 deletions trunk/drivers/media/video/pwc/pwc-if.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
#endif
#include <linux/vmalloc.h>
#include <asm/io.h>
#include <linux/kernel.h> /* simple_strtol() */

#include "pwc.h"
#include "pwc-kiara.h"
Expand Down Expand Up @@ -1916,19 +1917,6 @@ static void usb_pwc_disconnect(struct usb_interface *intf)
unlock_kernel();
}

/* *grunt* We have to do atoi ourselves :-( */
static int pwc_atoi(const char *s)
{
int k = 0;

k = 0;
while (*s != '\0' && *s >= '0' && *s <= '9') {
k = 10 * k + (*s - '0');
s++;
}
return k;
}


/*
* Initialization code & module stuff
Expand Down Expand Up @@ -2078,13 +2066,16 @@ static int __init usb_pwc_init(void)
}
else {
/* No type or serial number specified, just a number. */
device_hint[i].device_node = pwc_atoi(s);
device_hint[i].device_node =
simple_strtol(s, NULL, 10);
}
}
else {
/* There's a colon, so we have at least a type and a device node */
device_hint[i].type = pwc_atoi(s);
device_hint[i].device_node = pwc_atoi(colon + 1);
device_hint[i].type =
simple_strtol(s, NULL, 10);
device_hint[i].device_node =
simple_strtol(colon + 1, NULL, 10);
if (*dot != '\0') {
/* There's a serial number as well */
int k;
Expand Down

0 comments on commit 932dde8

Please sign in to comment.