Merge branch 'lxt-cleanups'
Sergei Shtylyov says: ==================== Here's the set of 2 patches against DaveM's 'net-next.git' repo. We save several LoCs on the unneeded local variables.... [1/2] lxt: simplify lxt97[01]_config_intr() [2/2] lxt: simplify lxt970_config_init() ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
b0456b24ff
1 changed files with 5 additions and 17 deletions
|
@ -80,23 +80,15 @@ static int lxt970_ack_interrupt(struct phy_device *phydev)
|
|||
|
||||
static int lxt970_config_intr(struct phy_device *phydev)
|
||||
{
|
||||
int err;
|
||||
|
||||
if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
|
||||
err = phy_write(phydev, MII_LXT970_IER, MII_LXT970_IER_IEN);
|
||||
return phy_write(phydev, MII_LXT970_IER, MII_LXT970_IER_IEN);
|
||||
else
|
||||
err = phy_write(phydev, MII_LXT970_IER, 0);
|
||||
|
||||
return err;
|
||||
return phy_write(phydev, MII_LXT970_IER, 0);
|
||||
}
|
||||
|
||||
static int lxt970_config_init(struct phy_device *phydev)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = phy_write(phydev, MII_LXT970_CONFIG, 0);
|
||||
|
||||
return err;
|
||||
return phy_write(phydev, MII_LXT970_CONFIG, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -112,14 +104,10 @@ static int lxt971_ack_interrupt(struct phy_device *phydev)
|
|||
|
||||
static int lxt971_config_intr(struct phy_device *phydev)
|
||||
{
|
||||
int err;
|
||||
|
||||
if (phydev->interrupts == PHY_INTERRUPT_ENABLED)
|
||||
err = phy_write(phydev, MII_LXT971_IER, MII_LXT971_IER_IEN);
|
||||
return phy_write(phydev, MII_LXT971_IER, MII_LXT971_IER_IEN);
|
||||
else
|
||||
err = phy_write(phydev, MII_LXT971_IER, 0);
|
||||
|
||||
return err;
|
||||
return phy_write(phydev, MII_LXT971_IER, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in a new issue