From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Magnus Damm <magnus.damm@gmail.com>, gregkh@suse.de
Cc: linux-pm@lists.linux-foundation.org
Subject: Re: [PATCH][RFC] pm: remove device_type suspend()/resume()
Date: Mon, 1 Jun 2009 20:40:57 +0200 [thread overview]
Message-ID: <200906012040.58290.rjw@sisk.pl> (raw)
In-Reply-To: <20090601103836.10959.43392.sendpatchset@rx1.opensource.se>
On Monday 01 June 2009, Magnus Damm wrote:
> From: Magnus Damm <damm@igel.co.jp>
>
> This patch removes the legacy callbacks ->suspend() and
> ->resume() from struct device_type. These callbacks seem
> unused, and new code should instead make use of struct
> dev_pm_ops.
>
> Signed-off-by: Magnus Damm <damm@igel.co.jp>
This is fine by me.
Greg, Pavel, Alan, any objections?
Rafael
> ---
>
> Only lightly compile tested on my laptop, could use some
> multi-arch build farm verification.
>
> drivers/base/power/main.c | 7 -------
> include/linux/device.h | 3 ---
> 2 files changed, 10 deletions(-)
>
> --- 0001/drivers/base/power/main.c
> +++ work/drivers/base/power/main.c 2009-06-01 17:07:23.000000000 +0900
> @@ -399,9 +399,6 @@ static int device_resume(struct device *
> if (dev->type->pm) {
> pm_dev_dbg(dev, state, "type ");
> error = pm_op(dev, dev->type->pm, state);
> - } else if (dev->type->resume) {
> - pm_dev_dbg(dev, state, "legacy type ");
> - error = dev->type->resume(dev);
> }
> if (error)
> goto End;
> @@ -641,10 +638,6 @@ static int device_suspend(struct device
> if (dev->type->pm) {
> pm_dev_dbg(dev, state, "type ");
> error = pm_op(dev, dev->type->pm, state);
> - } else if (dev->type->suspend) {
> - pm_dev_dbg(dev, state, "legacy type ");
> - error = dev->type->suspend(dev, state);
> - suspend_report_result(dev->type->suspend, error);
> }
> if (error)
> goto End;
> --- 0001/include/linux/device.h
> +++ work/include/linux/device.h 2009-06-01 17:00:20.000000000 +0900
> @@ -293,9 +293,6 @@ struct device_type {
> char *(*nodename)(struct device *dev);
> void (*release)(struct device *dev);
>
> - int (*suspend)(struct device *dev, pm_message_t state);
> - int (*resume)(struct device *dev);
> -
> struct dev_pm_ops *pm;
> };
next prev parent reply other threads:[~2009-06-01 18:40 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-06-01 10:38 [PATCH][RFC] pm: remove device_type suspend()/resume() Magnus Damm
2009-06-01 18:40 ` Rafael J. Wysocki [this message]
2009-06-01 18:56 ` Alan Stern
2009-06-01 19:59 ` Pavel Machek
2009-06-01 21:02 ` Greg KH
2009-06-01 22:47 ` Rafael J. Wysocki
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=200906012040.58290.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=gregkh@suse.de \
--cc=linux-pm@lists.linux-foundation.org \
--cc=magnus.damm@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