All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Kleine-Budde <mkl@pengutronix.de>
To: "Lothar Waßmann" <LW@KARO-electronics.de>,
	"Appana Durga Kedareswara Rao" <appana.durga.rao@xilinx.com>
Cc: "wg@grandegger.com" <wg@grandegger.com>,
	Michal Simek <michals@xilinx.com>,
	Soren Brinkmann <sorenb@xilinx.com>,
	"grant.likely@linaro.org" <grant.likely@linaro.org>,
	"robh+dt@kernel.org" <robh+dt@kernel.org>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"linux-arm-kernel@lists.infradead.org"
	<linux-arm-kernel@lists.infradead.org>,
	"linux-can@vger.kernel.org" <linux-can@vger.kernel.org>
Subject: Re: [PATCH] can: Fix bug in suspend/resume
Date: Thu, 13 Nov 2014 13:03:22 +0100	[thread overview]
Message-ID: <54649E0A.7030607@pengutronix.de> (raw)
In-Reply-To: <20141113123218.79850236@ipc1.ka-ro>

[-- Attachment #1: Type: text/plain, Size: 847 bytes --]

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: mkl@pengutronix.de (Marc Kleine-Budde)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] can: Fix bug in suspend/resume
Date: Thu, 13 Nov 2014 13:03:22 +0100	[thread overview]
Message-ID: <54649E0A.7030607@pengutronix.de> (raw)
In-Reply-To: <20141113123218.79850236@ipc1.ka-ro>

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   |

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20141113/7020cd38/attachment.sig>

  reply	other threads:[~2014-11-13 12:03 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-13  6:58 [PATCH] can: Fix bug in suspend/resume Kedareswara rao Appana
2014-11-13  6:58 ` Kedareswara rao Appana
2014-11-13  6:58 ` Kedareswara rao Appana
2014-11-13  6:58 ` Kedareswara rao Appana
2014-11-13 10:15 ` Marc Kleine-Budde
2014-11-13 10:15   ` Marc Kleine-Budde
2014-11-13 10:46   ` Marc Kleine-Budde
2014-11-13 10:46     ` Marc Kleine-Budde
     [not found]     ` <54648BF4.60007-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2014-11-13 10:58       ` Appana Durga Kedareswara Rao
2014-11-13 10:58         ` Appana Durga Kedareswara Rao
2014-11-13 10:58         ` Appana Durga Kedareswara Rao
2014-11-13 11:32         ` Lothar Waßmann
2014-11-13 11:32           ` Lothar Waßmann
2014-11-13 12:03           ` Marc Kleine-Budde [this message]
2014-11-13 12:03             ` Marc Kleine-Budde
2014-11-13 11:01     ` Appana Durga Kedareswara Rao
2014-11-13 11:01       ` Appana Durga Kedareswara Rao
2014-11-13 11:01       ` Appana Durga Kedareswara Rao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=54649E0A.7030607@pengutronix.de \
    --to=mkl@pengutronix.de \
    --cc=LW@KARO-electronics.de \
    --cc=appana.durga.rao@xilinx.com \
    --cc=devicetree@vger.kernel.org \
    --cc=grant.likely@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-can@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michals@xilinx.com \
    --cc=netdev@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=sorenb@xilinx.com \
    --cc=wg@grandegger.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.