[ARM] 5600/1: ep93xx: core.c remove cast when copying dev_addr
authorHartley Sweeten <hartleys@visionengravers.com>
Mon, 13 Jul 2009 18:50:10 +0000 (19:50 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Fri, 17 Jul 2009 12:35:55 +0000 (13:35 +0100)
The MAC address for the ep93xx ethernet driver can be optionally
copied from registers in the controller when booting.  Due to
[ARM] 5573/1: ep93xx: ensure typesafe io, the cast for the source
address is no longer needed.

EP93XX_ETHERNET_BASE is typed as a (void __iomem __force *) so
memcpy_fromio() needs to be used instead of memcpy().

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/mach-ep93xx/core.c

index 68ac0545f570c0b8e016b3719e64866c269e3cf0..4c38941a92c7d584aca803d8b92fd4b6ba3ef2b8 100644 (file)
@@ -541,10 +541,8 @@ static struct platform_device ep93xx_eth_device = {
 
 void __init ep93xx_register_eth(struct ep93xx_eth_data *data, int copy_addr)
 {
-       if (copy_addr) {
-               memcpy(data->dev_addr,
-                       (void *)(EP93XX_ETHERNET_BASE + 0x50), 6);
-       }
+       if (copy_addr)
+               memcpy_fromio(data->dev_addr, EP93XX_ETHERNET_BASE + 0x50, 6);
 
        ep93xx_eth_data = *data;
        platform_device_register(&ep93xx_eth_device);
This page took 0.03048 seconds and 5 git commands to generate.