Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 260386
b: refs/heads/master
c: c8e5885
h: refs/heads/master
v: v3
  • Loading branch information
Andy Shevchenko authored and Ralf Baechle committed Jul 25, 2011
1 parent f572268 commit 4c4ba4a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 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: 5fba0960809534f008260a621046f38a5f46f417
refs/heads/master: c8e58856f2f288bfe076ad9205d9a10623498c96
24 changes: 9 additions & 15 deletions trunk/arch/mips/rb532/devices.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,28 +251,22 @@ static struct platform_device *rb532_devs[] = {

static void __init parse_mac_addr(char *macstr)
{
int i, j;
unsigned char result, value;
int i, h, l;

for (i = 0; i < 6; i++) {
result = 0;

if (i != 5 && *(macstr + 2) != ':')
return;

for (j = 0; j < 2; j++) {
if (isxdigit(*macstr)
&& (value =
isdigit(*macstr) ? *macstr -
'0' : toupper(*macstr) - 'A' + 10) < 16) {
result = result * 16 + value;
macstr++;
} else
return;
}
h = hex_to_bin(*macstr++);
if (h == -1)
return;

l = hex_to_bin(*macstr++);
if (l == -1)
return;

macstr++;
korina_dev0_data.mac[i] = result;
korina_dev0_data.mac[i] = (h << 4) + l;
}
}

Expand Down

0 comments on commit 4c4ba4a

Please sign in to comment.