mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-27 06:34:11 +08:00
usb: phy: simplify getting .drvdata
We should get drvdata from struct device directly. Going via platform_device is an unneeded step back and forth. Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
This commit is contained in:
parent
8836b39a16
commit
64f5b56c91
@ -96,8 +96,7 @@ static int am335x_phy_remove(struct platform_device *pdev)
|
||||
#ifdef CONFIG_PM_SLEEP
|
||||
static int am335x_phy_suspend(struct device *dev)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct am335x_phy *am_phy = platform_get_drvdata(pdev);
|
||||
struct am335x_phy *am_phy = dev_get_drvdata(dev);
|
||||
|
||||
/*
|
||||
* Enable phy wakeup only if dev->power.can_wakeup is true.
|
||||
@ -117,8 +116,7 @@ static int am335x_phy_suspend(struct device *dev)
|
||||
|
||||
static int am335x_phy_resume(struct device *dev)
|
||||
{
|
||||
struct platform_device *pdev = to_platform_device(dev);
|
||||
struct am335x_phy *am_phy = platform_get_drvdata(pdev);
|
||||
struct am335x_phy *am_phy = dev_get_drvdata(dev);
|
||||
|
||||
phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, am_phy->dr_mode, true);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user