|
@@ -345,8 +345,7 @@ static int ehci_platform_suspend(struct device *dev)
|
|
|
{
|
|
|
struct usb_hcd *hcd = dev_get_drvdata(dev);
|
|
|
struct usb_ehci_pdata *pdata = dev_get_platdata(dev);
|
|
|
- struct platform_device *pdev =
|
|
|
- container_of(dev, struct platform_device, dev);
|
|
|
+ struct platform_device *pdev = to_platform_device(dev);
|
|
|
bool do_wakeup = device_may_wakeup(dev);
|
|
|
int ret;
|
|
|
|
|
@@ -364,8 +363,7 @@ static int ehci_platform_resume(struct device *dev)
|
|
|
{
|
|
|
struct usb_hcd *hcd = dev_get_drvdata(dev);
|
|
|
struct usb_ehci_pdata *pdata = dev_get_platdata(dev);
|
|
|
- struct platform_device *pdev =
|
|
|
- container_of(dev, struct platform_device, dev);
|
|
|
+ struct platform_device *pdev = to_platform_device(dev);
|
|
|
struct ehci_platform_priv *priv = hcd_to_ehci_priv(hcd);
|
|
|
|
|
|
if (pdata->power_on) {
|