mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: Geliang Tang <geliangtang@163.com>
Cc: Wim Van Sebroeck <wim@iguana.be>,
	linux-watchdog@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 09/10] watchdog: cadence_wdt: use to_platform_device()
Date: Sun, 27 Dec 2015 07:27:03 -0800	[thread overview]
Message-ID: <20151227152703.GA8944@roeck-us.net> (raw)
In-Reply-To: <bfab2ac46e1ff47b86258cc38ff1d698edc6017b.1451221174.git.geliangtang@163.com>

On Sun, Dec 27, 2015 at 09:15:47PM +0800, Geliang Tang wrote:
> Use to_platform_device() instead of open-coding it.
> 
> Signed-off-by: Geliang Tang <geliangtang@163.com>

Reviewed-by: Guenter Roeck <linux@roeck-us.net>

> ---
>  drivers/watchdog/cadence_wdt.c | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/watchdog/cadence_wdt.c b/drivers/watchdog/cadence_wdt.c
> index abf64eb..4dda902 100644
> --- a/drivers/watchdog/cadence_wdt.c
> +++ b/drivers/watchdog/cadence_wdt.c
> @@ -421,8 +421,7 @@ static void cdns_wdt_shutdown(struct platform_device *pdev)
>   */
>  static int __maybe_unused cdns_wdt_suspend(struct device *dev)
>  {
> -	struct platform_device *pdev = container_of(dev,
> -			struct platform_device, dev);
> +	struct platform_device *pdev = to_platform_device(dev);
>  	struct cdns_wdt *wdt = platform_get_drvdata(pdev);
>  
>  	cdns_wdt_stop(&wdt->cdns_wdt_device);
> @@ -440,8 +439,7 @@ static int __maybe_unused cdns_wdt_suspend(struct device *dev)
>  static int __maybe_unused cdns_wdt_resume(struct device *dev)
>  {
>  	int ret;
> -	struct platform_device *pdev = container_of(dev,
> -			struct platform_device, dev);
> +	struct platform_device *pdev = to_platform_device(dev);
>  	struct cdns_wdt *wdt = platform_get_drvdata(pdev);
>  
>  	ret = clk_prepare_enable(wdt->clk);
> -- 
> 2.5.0
> 
> 

  reply	other threads:[~2015-12-27 15:27 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-12-27 13:15 [PATCH 01/10] PM / devfreq: exynos: " Geliang Tang
2015-12-27 13:15 ` [PATCH 02/10] spi: cadence, zynq: " Geliang Tang
2015-12-29 18:01   ` Moritz Fischer
2015-12-30 14:57     ` [PATCH 1/2] spi: cadence: " Geliang Tang
2015-12-30 14:57       ` [PATCH 2/2] spi: zynq: " Geliang Tang
2015-12-30 17:02       ` [PATCH 1/2] spi: cadence: " Mark Brown
2015-12-27 13:15 ` [PATCH 03/10] dmaengine: ppc4xx: " Geliang Tang
2016-01-06  9:22   ` Vinod Koul
2016-01-18 16:02     ` [PATCH 03/10 v2] " Geliang Tang
2015-12-27 13:15 ` [PATCH 04/10] i2c: st: " Geliang Tang
2016-01-03 18:55   ` Wolfram Sang
2015-12-27 13:15 ` [PATCH 05/10] mmc: cb710: " Geliang Tang
2015-12-28 13:29   ` Ulf Hansson
2015-12-27 13:15 ` [PATCH 06/10] net: hns: " Geliang Tang
2015-12-27 13:23   ` Andy Shevchenko
2015-12-27 17:03     ` Geliang Tang
2015-12-29 20:47   ` David Miller
2015-12-27 13:15 ` [PATCH 07/10] platform/chrome: " Geliang Tang
2016-03-06 22:15   ` Olof Johansson
2015-12-27 13:15 ` [PATCH 08/10] staging: fbtft: " Geliang Tang
2015-12-27 13:15 ` [PATCH 09/10] watchdog: cadence_wdt: " Geliang Tang
2015-12-27 15:27   ` Guenter Roeck [this message]
2015-12-27 20:17   ` Wim Van Sebroeck
2015-12-27 13:17 ` [PATCH 10/10] ARM: plat-samsung: " Geliang Tang
2015-12-28  2:01   ` Krzysztof Kozlowski
2016-01-25  7:09     ` Krzysztof Kozlowski

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=20151227152703.GA8944@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=geliangtang@163.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=wim@iguana.be \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome