[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9235D6609DB808459E95D78E17F2E43D40B3C801@CHN-SV-EXMX02.mchp-main.com>
Date: Tue, 3 Oct 2017 17:43:16 +0000
From: <Woojung.Huh@...rochip.com>
To: <dmurphy@...com>, <andrew@...n.ch>, <f.fainelli@...il.com>
CC: <netdev@...r.kernel.org>
Subject: RE: [PATCH] net: phy: DP83822 initial driver submission
> +static int dp83822_suspend(struct phy_device *phydev)
> +{
> + int value;
> +
> + mutex_lock(&phydev->lock);
> +
> + value = phy_read_mmd(phydev, DP83822_DEVADDR,
> MII_DP83822_WOL_CFG);
> + if (~value & DP83822_WOL_EN) {
Same result, but how about " if (!(value & DP83822_WOL_EN))" ?
> + value = phy_read(phydev, MII_BMCR);
> + phy_write(phydev, MII_BMCR, value | BMCR_PDOWN);
> + }
> +
> + mutex_unlock(&phydev->lock);
> +
> + return 0;
> +}
Powered by blists - more mailing lists