net-next: mediatek: remove superfluous register reads
authorJohn Crispin <john@phrozen.org>
Wed, 29 Jun 2016 11:38:08 +0000 (13:38 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 30 Jun 2016 12:52:04 +0000 (08:52 -0400)
The driver was originally written for MIPS based SoC. These required the
IRQ mask register to be read after writing it to ensure that the content
was actually applied. As this version only works on ARM based SoCs, we can
safely remove the 2 reads as they are no longer required.

Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mediatek/mtk_eth_soc.c

index d1cdc2d7615158f612885e100a0cc274c22a3fe9..5a3a4e945374e9617d0a8982ca1f8e22369c96d8 100644 (file)
@@ -332,8 +332,6 @@ static inline void mtk_irq_disable(struct mtk_eth *eth, u32 mask)
 
        val = mtk_r32(eth, MTK_QDMA_INT_MASK);
        mtk_w32(eth, val & ~mask, MTK_QDMA_INT_MASK);
-       /* flush write */
-       mtk_r32(eth, MTK_QDMA_INT_MASK);
 }
 
 static inline void mtk_irq_enable(struct mtk_eth *eth, u32 mask)
@@ -342,8 +340,6 @@ static inline void mtk_irq_enable(struct mtk_eth *eth, u32 mask)
 
        val = mtk_r32(eth, MTK_QDMA_INT_MASK);
        mtk_w32(eth, val | mask, MTK_QDMA_INT_MASK);
-       /* flush write */
-       mtk_r32(eth, MTK_QDMA_INT_MASK);
 }
 
 static int mtk_set_mac_address(struct net_device *dev, void *p)
This page took 0.032136 seconds and 5 git commands to generate.