mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Greg KH <gregkh@linuxfoundation.org>
Cc: Ning Jiang <ning.n.jiang@gmail.com>,
	linux-kernel@vger.kernel.org,
	Linux PM mailing list <linux-pm@vger.kernel.org>
Subject: Re: Deprecate suspend/resume in device_driver
Date: Thu, 14 Jun 2012 21:11:39 +0200	[thread overview]
Message-ID: <201206142111.39618.rjw@sisk.pl> (raw)
In-Reply-To: <CAH3Oq6Sua5vmOioOQHZd6BYRvVGfeTrNCgCHpyhZAv2_HhhcZg@mail.gmail.com>

On Wednesday, June 13, 2012, Ning Jiang wrote:
> The suspend/resume will not be called if they are defined in
> device_driver directly,
> PM core will only use suspend/resume function in dev_pm_ops. Thus we shall
> mark the old suspend/resume deprecated and make them scheduled for removal.
> 
> 
> From efee1b349a8abcb4702d93c1c12e7f27c96fbcfc Mon Sep 17 00:00:00 2001
> From: Ning Jiang <ning.n.jiang@gmail.com>
> Date: Wed, 13 Jun 2012 15:00:33 +0800
> Subject: [PATCH] PM: Deprecate suspend/resume in device_driver
> 
> Make suspend/resume callbacks in device_driver deprecated and scheduled
> for removal since they are not used in PM core anymore.
> 
> Legacy drivers who still use them need to move suspend/resume callbacks
> to dev_pm_ops.
> 
> Signed-off-by: Ning Jiang <ning.n.jiang@gmail.com>

Greg, do you have any objections here?

Rafael


> ---
>  include/linux/device.h |    4 ++--
>  1 files changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/linux/device.h b/include/linux/device.h
> index e04f577..884d9a6 100644
> --- a/include/linux/device.h
> +++ b/include/linux/device.h
> @@ -226,8 +226,8 @@ struct device_driver {
>  	int (*probe) (struct device *dev);
>  	int (*remove) (struct device *dev);
>  	void (*shutdown) (struct device *dev);
> -	int (*suspend) (struct device *dev, pm_message_t state);
> -	int (*resume) (struct device *dev);
> +	int (*suspend) (struct device *dev, pm_message_t state) __deprecated;
> +	int (*resume) (struct device *dev) __deprecated;
>  	const struct attribute_group **groups;
> 
>  	const struct dev_pm_ops *pm;
> 


      reply	other threads:[~2012-06-14 19:06 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-13  7:33 Ning Jiang
2012-06-14 19:11 ` Rafael J. Wysocki [this message]

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=201206142111.39618.rjw@sisk.pl \
    --to=rjw@sisk.pl \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=ning.n.jiang@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®