Re: [PATCH] can: Fix bug in suspend/resume

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On 11/13/2014 12:32 PM, Lothar Waßmann wrote:
>>>>  static int __maybe_unused xcan_suspend(struct device *dev)  {
>>>> -    struct platform_device *pdev = dev_get_drvdata(dev);
>>>> +    struct platform_device *pdev = container_of(dev,
>>>> +                    struct platform_device, dev);
>>>>      struct net_device *ndev = platform_get_drvdata(pdev);
>>>>      struct xcan_priv *priv = netdev_priv(ndev);
>>
> Why not simply:
> 	struct net_device *ndev = dev_get_drvdata(dev);
> 
> There is no need for a struct platform_device* at all.

ACK

Marc

-- 
Pengutronix e.K.                  | Marc Kleine-Budde           |
Industrial Linux Solutions        | Phone: +49-231-2826-924     |
Vertretung West/Dortmund          | Fax:   +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686  | http://www.pengutronix.de   |

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux