[PATCH 40/45] kstrtox: convert drivers/ssb/

From: Alexey Dobriyan
Date: Sun Dec 05 2010 - 12:53:19 EST



Signed-off-by: Alexey Dobriyan <adobriyan@xxxxxxxxx>
---
drivers/ssb/sprom.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/ssb/sprom.c b/drivers/ssb/sprom.c
index 4f7cc8d..fea2ac4 100644
--- a/drivers/ssb/sprom.c
+++ b/drivers/ssb/sprom.c
@@ -38,7 +38,6 @@ static int hex2sprom(u16 *sprom, const char *dump, size_t len,
{
char c, tmp[5] = { 0 };
int err, cnt = 0;
- unsigned long parsed;

/* Strip whitespace at the end. */
while (len) {
@@ -52,12 +51,14 @@ static int hex2sprom(u16 *sprom, const char *dump, size_t len,
return -EINVAL;

while (cnt < sprom_size_words) {
+ u16 parsed;
+
memcpy(tmp, dump, 4);
dump += 4;
- err = strict_strtoul(tmp, 16, &parsed);
+ err = kstrtou16(tmp, 16, &parsed);
if (err)
return err;
- sprom[cnt++] = swab16((u16)parsed);
+ sprom[cnt++] = swab16(parsed);
}

return 0;
--
1.7.2.2

--
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/