Re: [PATCH v5 12/12] tree-wide: convert open calls to removespaces to skip_spaces() lib function

From: Henrique de Moraes Holschuh
Date: Mon Nov 16 2009 - 10:02:33 EST


> diff --git a/drivers/platform/x86/thinkpad_acpi.c b/drivers/platform/x86/thinkpad_acpi.c
> index d93108d..e8026d9 100644
> --- a/drivers/platform/x86/thinkpad_acpi.c
> +++ b/drivers/platform/x86/thinkpad_acpi.c
> @@ -1006,11 +1006,8 @@ static int parse_strtoul(const char *buf,
> {
> char *endp;
>
> - while (*buf && isspace(*buf))
> - buf++;
> - *value = simple_strtoul(buf, &endp, 0);
> - while (*endp && isspace(*endp))
> - endp++;
> + *value = simple_strtoul(skip_spaces(buf), &endp, 0);
> + endp = skip_spaces(endp);
> if (*endp || *value > max)
> return -EINVAL;
>

Acked-by: Henrique de Moraes Holschuh <hmh@xxxxxxxxxx>
(thinkpad-acpi changes only)

--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/