summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2009-09-07 10:52:24 +0200
committerTom Rix <Tom.Rix@windriver.com>2009-10-03 09:04:18 -0500
commited51257e2a1e0a6e37cfbd2b116a4d674d678db2 (patch)
tree311e1db5b9a3b1ea622d6260b86b19d38f9e5348
parent9c721657ad57781c7024c006426181ca6723a420 (diff)
ppc4xx: Fix compilation warning in 4xx miiphy.c
This patch fixes the following compilation warning: miiphy.c: In function 'emac4xx_miiphy_read': miiphy.c:353: warning: dereferencing type-punned pointer will break strict-aliasing rules Signed-off-by: Stefan Roese <sr@denx.de>
-rw-r--r--cpu/ppc4xx/miiphy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpu/ppc4xx/miiphy.c b/cpu/ppc4xx/miiphy.c
index 6a92bf8364..fa3bfc8d9f 100644
--- a/cpu/ppc4xx/miiphy.c
+++ b/cpu/ppc4xx/miiphy.c
@@ -350,7 +350,7 @@ int emac4xx_miiphy_read (char *devname, unsigned char addr, unsigned char reg,
return -1;
sta_reg = in_be32((void *)EMAC_STACR + emac_reg);
- *value = *(u16 *)(&sta_reg);
+ *value = sta_reg >> 16;
return 0;
}