[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1336129033-15826-3-git-send-email-steve.glendinning@shawell.net>
Date: Fri, 4 May 2012 11:57:12 +0100
From: Steve Glendinning <steve.glendinning@...well.net>
To: netdev@...r.kernel.org
Cc: "David S. Miller" <davem@...emloft.net>,
Steve Glendinning <steve.glendinning@...well.net>
Subject: [PATCH 2/3] smsc75xx: eliminate unnecessary phy register read
Only a write is necessary to clear the interrupt status, and we
don't use the value from the preceding read operation. This
patch eliminates the unnecessary read.
Signed-off-by: Steve Glendinning <steve.glendinning@...well.net>
---
drivers/net/usb/smsc75xx.c | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/drivers/net/usb/smsc75xx.c b/drivers/net/usb/smsc75xx.c
index ecab87b..72b62b5 100644
--- a/drivers/net/usb/smsc75xx.c
+++ b/drivers/net/usb/smsc75xx.c
@@ -508,9 +508,7 @@ static int smsc75xx_link_reset(struct usbnet *dev)
u16 lcladv, rmtadv;
int ret;
- /* read and write to clear phy interrupt status */
- ret = smsc75xx_mdio_read(dev->net, mii->phy_id, PHY_INT_SRC);
- check_warn_return(ret, "Error reading PHY_INT_SRC");
+ /* write to clear phy interrupt status */
smsc75xx_mdio_write(dev->net, mii->phy_id, PHY_INT_SRC,
PHY_INT_SRC_CLEAR_ALL);
--
1.7.9.5
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists