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);
ant.lik...@linaro.org; robh...@kernel.org
> Cc: linux-...@vger.kernel.org; net...@vger.kernel.org;
> linux-arm-ker...@lists.infradead.org; linux-ker...@vger.kernel.org;
> devicetree@vger.kernel.org; Appana Durga Kedareswara Rao
> Subject: Re: [PATCH] can: Fix bug in suspend/resume
rg;
linux-arm-ker...@lists.infradead.org; linux-ker...@vger.kernel.org;
devicetree@vger.kernel.org
Subject: RE: [PATCH] can: Fix bug in suspend/resume
Hi Marc,
-Original Message-
From: Marc Kleine-Budde [mailto:m...@pengutronix.de]
Sent: Thursday, November 13, 2014 4:16 PM
To: Ap
...@vger.kernel.org;
linux-arm-ker...@lists.infradead.org; linux-ker...@vger.kernel.org;
devicetree@vger.kernel.org; Appana Durga Kedareswara Rao
Subject: Re: [PATCH] can: Fix bug in suspend/resume
On 11/13/2014 11:15 AM, Marc Kleine-Budde wrote:
> On 11/13/2014 07:58 AM, Kedareswara rao App
On 11/13/2014 11:15 AM, Marc Kleine-Budde wrote:
> On 11/13/2014 07:58 AM, Kedareswara rao Appana wrote:
>> When accessing the priv structure use container_of instead of
>> dev_get_drvdata.
>
> Why?
The drvdata here is the struct net_device, not the platform device.
Please state this in the comm
On 11/13/2014 07:58 AM, Kedareswara rao Appana wrote:
> When accessing the priv structure use container_of instead of dev_get_drvdata.
Why?
> Enable the clocks in the suspend before accessing the registers of the CAN.
>
> Signed-off-by: Kedareswara rao Appana
> ---
> drivers/net/can/xilinx_can