mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 10:49:33 +00:00
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@shawell.net> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7749622d7f
commit
4f94a929e4
1 changed files with 1 additions and 3 deletions
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in a new issue