linux-watchdog.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Guenter Roeck <linux@roeck-us.net>
To: "Enrico Weigelt, metux IT consult" <info@metux.net>
Cc: linux-kernel@vger.kernel.org, wim@linux-watchdog.org,
	linux-watchdog@vger.kernel.org
Subject: Re: [PATCH 1/2] watchdog: iTCO_wdt: use pm_ptr()
Date: Wed, 16 Jun 2021 19:02:00 -0700	[thread overview]
Message-ID: <20210617020200.GA3214397@roeck-us.net> (raw)
In-Reply-To: <20210616181708.19530-1-info@metux.net>

On Wed, Jun 16, 2021 at 08:17:07PM +0200, Enrico Weigelt, metux IT consult wrote:
> Reduce a little bit of boilerplate by using pm_ptr().
> 
> Signed-off-by: Enrico Weigelt, metux IT consult <info@metux.net>

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

> ---
>  drivers/watchdog/iTCO_wdt.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/drivers/watchdog/iTCO_wdt.c b/drivers/watchdog/iTCO_wdt.c
> index bf31d7b67a69..6ba2b2f60737 100644
> --- a/drivers/watchdog/iTCO_wdt.c
> +++ b/drivers/watchdog/iTCO_wdt.c
> @@ -636,16 +636,13 @@ static const struct dev_pm_ops iTCO_wdt_pm = {
>  	.resume_noirq = iTCO_wdt_resume_noirq,
>  };
>  
> -#define ITCO_WDT_PM_OPS	(&iTCO_wdt_pm)
> -#else
> -#define ITCO_WDT_PM_OPS	NULL
>  #endif /* CONFIG_PM_SLEEP */
>  
>  static struct platform_driver iTCO_wdt_driver = {
>  	.probe          = iTCO_wdt_probe,
>  	.driver         = {
>  		.name   = DRV_NAME,
> -		.pm     = ITCO_WDT_PM_OPS,
> +		.pm     = pm_ptr(&iTCO_wdt_pm),
>  	},
>  };
>  
> -- 
> 2.20.1
> 

  parent reply	other threads:[~2021-06-17  2:02 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-16 18:17 [PATCH 1/2] watchdog: iTCO_wdt: use pm_ptr() Enrico Weigelt, metux IT consult
2021-06-16 18:17 ` [PATCH 2/2] watchdog: iTCO_wdt: use dev_err() instead of pr_err() Enrico Weigelt, metux IT consult
2021-06-17  2:02   ` Guenter Roeck
2021-06-17  2:02 ` Guenter Roeck [this message]
2021-06-19 22:27 ` [PATCH 1/2] watchdog: iTCO_wdt: use pm_ptr() kernel test robot
2021-06-19 23:19   ` Guenter Roeck

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=20210617020200.GA3214397@roeck-us.net \
    --to=linux@roeck-us.net \
    --cc=info@metux.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-watchdog@vger.kernel.org \
    --cc=wim@linux-watchdog.org \
    /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;
as well as URLs for NNTP newsgroup(s).