net: sh_eth: fix endian check for architecture independent
authorYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Thu, 29 Mar 2012 19:32:08 +0000 (19:32 +0000)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Apr 2012 03:22:11 +0000 (23:22 -0400)
SuperH has the "CONFIG_CPU_LITTLE_ENDIAN" and the "__LITTLE_ENDIAN__".
But, other architecture doesn't have them. So, this patch fixes it.

Signed-off-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/renesas/sh_eth.c
drivers/net/ethernet/renesas/sh_eth.h

index 8bdf070ace90d44cb5fa3f55f0c37717d8abd60d..d63e09b29a961b8cfc809a23b04821b8d56e7a8f 100644 (file)
@@ -804,7 +804,7 @@ static int sh_eth_dev_init(struct net_device *ndev)
        /* all sh_eth int mask */
        sh_eth_write(ndev, 0, EESIPR);
 
-#if defined(__LITTLE_ENDIAN__)
+#if defined(__LITTLE_ENDIAN)
        if (mdp->cd->hw_swap)
                sh_eth_write(ndev, EDMR_EL, EDMR);
        else
index e66de182353210b4f62367ee06d251c77b71f00e..0fa14afce23d47bb95fff404ca198339d3a4b891 100644 (file)
@@ -693,7 +693,7 @@ enum TSU_FWSLC_BIT {
  */
 struct sh_eth_txdesc {
        u32 status;             /* TD0 */
-#if defined(CONFIG_CPU_LITTLE_ENDIAN)
+#if defined(__LITTLE_ENDIAN)
        u16 pad0;               /* TD1 */
        u16 buffer_length;      /* TD1 */
 #else
@@ -710,7 +710,7 @@ struct sh_eth_txdesc {
  */
 struct sh_eth_rxdesc {
        u32 status;             /* RD0 */
-#if defined(CONFIG_CPU_LITTLE_ENDIAN)
+#if defined(__LITTLE_ENDIAN)
        u16 frame_length;       /* RD1 */
        u16 buffer_length;      /* RD1 */
 #else