public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
From: Magnus Damm <magnus.damm@gmail.com>
To: linux-pm@lists.linux-foundation.org
Cc: gregkh@suse.de
Subject: [PATCH][RFC] pm: remove device_type suspend()/resume()
Date: Mon, 01 Jun 2009 19:38:36 +0900	[thread overview]
Message-ID: <20090601103836.10959.43392.sendpatchset@rx1.opensource.se> (raw)

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>
---

 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;
 };
 

             reply	other threads:[~2009-06-01 10:38 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-01 10:38 Magnus Damm [this message]
2009-06-01 18:40 ` [PATCH][RFC] pm: remove device_type suspend()/resume() Rafael J. Wysocki
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=20090601103836.10959.43392.sendpatchset@rx1.opensource.se \
    --to=magnus.damm@gmail.com \
    --cc=gregkh@suse.de \
    --cc=linux-pm@lists.linux-foundation.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