From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: pm list <linux-pm@lists.linux-foundation.org>
Cc: Alan Stern <stern@rowland.harvard.edu>,
David Brownell <david-b@pacbell.net>, Greg KH <greg@kroah.com>,
LKML <linux-kernel@vger.kernel.org>, Pavel Machek <pavel@ucw.cz>,
USB development list <linux-usb-devel@lists.sourceforge.net>
Subject: [RFC][PATCH -mm 4/7] PM: Remove suspend and resume support from struct device_type
Date: Mon, 11 Jun 2007 17:01:44 +0200 [thread overview]
Message-ID: <200706111701.44988.rjw@sisk.pl> (raw)
In-Reply-To: <200706111655.50022.rjw@sisk.pl>
From: Rafael J. Wysocki <rjw@sisk.pl>
The suspend and resume support in struct device_type (include/linux/device.h)
is not used anywhere. It is also undocumented, so it can be removed.
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
---
drivers/base/power/resume.c | 5 -----
drivers/base/power/suspend.c | 7 -------
include/linux/device.h | 2 --
3 files changed, 14 deletions(-)
Index: linux-2.6.22-rc4/drivers/base/power/resume.c
===================================================================
--- linux-2.6.22-rc4.orig/drivers/base/power/resume.c 2007-06-10 15:00:23.000000000 +0200
+++ linux-2.6.22-rc4/drivers/base/power/resume.c 2007-06-10 15:02:04.000000000 +0200
@@ -41,11 +41,6 @@ int resume_device(struct device * dev)
error = dev->bus->resume(dev);
}
- if (!error && dev->type && dev->type->resume) {
- dev_dbg(dev,"resuming\n");
- error = dev->type->resume(dev);
- }
-
if (!error && dev->class && dev->class->resume) {
dev_dbg(dev,"class resume\n");
error = dev->class->resume(dev);
Index: linux-2.6.22-rc4/drivers/base/power/suspend.c
===================================================================
--- linux-2.6.22-rc4.orig/drivers/base/power/suspend.c 2007-06-10 15:00:40.000000000 +0200
+++ linux-2.6.22-rc4/drivers/base/power/suspend.c 2007-06-10 15:02:04.000000000 +0200
@@ -79,13 +79,6 @@ int suspend_device(struct device * dev,
suspend_report_result(dev->class->suspend, error);
}
- if (!error && dev->type && dev->type->suspend
- && !dev->power.power_state.event) {
- suspend_device_dbg(dev, state, "type ");
- error = dev->type->suspend(dev, state);
- suspend_report_result(dev->type->suspend, error);
- }
-
if (!error && dev->bus && dev->bus->suspend
&& !dev->power.power_state.event) {
suspend_device_dbg(dev, state, "");
Index: linux-2.6.22-rc4/include/linux/device.h
===================================================================
--- linux-2.6.22-rc4.orig/include/linux/device.h 2007-06-10 15:00:23.000000000 +0200
+++ linux-2.6.22-rc4/include/linux/device.h 2007-06-10 15:02:04.000000000 +0200
@@ -343,8 +343,6 @@ struct device_type {
int (*uevent)(struct device *dev, char **envp, int num_envp,
char *buffer, int buffer_size);
void (*release)(struct device *dev);
- int (*suspend)(struct device * dev, pm_message_t state);
- int (*resume)(struct device * dev);
};
/* interface for exporting device attributes */
next prev parent reply other threads:[~2007-06-11 15:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-11 14:55 [RFC][PATCH -mm 0/7] PM: Remove unused and unnecessary features from suspend and resume core Rafael J. Wysocki
2007-06-11 14:57 ` [RFC][PATCH -mm 1/7] PM: Remove pm_parent from struct dev_pm_info Rafael J. Wysocki
2007-06-11 15:59 ` Alan Stern
2007-06-11 18:52 ` Rafael J. Wysocki
2007-06-11 19:55 ` Rafael J. Wysocki
2007-06-11 14:58 ` [RFC][PATCH -mm 2/7] PM: Remove saved_state " Rafael J. Wysocki
2007-06-11 15:01 ` Rafael J. Wysocki [this message]
2007-06-11 15:01 ` [RFC][PATCH -mm 3/7] PM: Simplify suspend_device Rafael J. Wysocki
2007-06-11 21:39 ` Pavel Machek
2007-06-11 15:02 ` [RFC][PATCH -mm 5/7] PM: Remove prev_state from struct dev_pm_info Rafael J. Wysocki
2007-06-11 15:04 ` [RFC][PATCH -mm 6/7] PM: Remove power_state.event checks from suspend core code Rafael J. Wysocki
2007-06-11 15:06 ` [RFC][PATCH -mm 7/7] PM: Do not check parent state in suspend and resume " 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=200706111701.44988.rjw@sisk.pl \
--to=rjw@sisk.pl \
--cc=david-b@pacbell.net \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@lists.linux-foundation.org \
--cc=linux-usb-devel@lists.sourceforge.net \
--cc=pavel@ucw.cz \
--cc=stern@rowland.harvard.edu \
/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®