aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMagnus Damm <damm@igel.co.jp>2009-06-04 16:13:25 -0400
committerRafael J. Wysocki <rjw@sisk.pl>2009-06-12 15:32:32 -0400
commit00725787511e20dbd1fdc1fb233606120ae5c8cf (patch)
tree82fa3c48aca074a993a122751a2333000e1668a3
parentfe419535d82724314bbf1244a0e740e4ea1bd3ae (diff)
PM: Remove device_type suspend()/resume()
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> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
-rw-r--r--drivers/base/power/main.c7
-rw-r--r--include/linux/device.h3
2 files changed, 0 insertions, 10 deletions
diff --git a/drivers/base/power/main.c b/drivers/base/power/main.c
index 68f9f3cecf7a..fae725458981 100644
--- a/drivers/base/power/main.c
+++ b/drivers/base/power/main.c
@@ -399,9 +399,6 @@ static int device_resume(struct device *dev, pm_message_t state)
399 if (dev->type->pm) { 399 if (dev->type->pm) {
400 pm_dev_dbg(dev, state, "type "); 400 pm_dev_dbg(dev, state, "type ");
401 error = pm_op(dev, dev->type->pm, state); 401 error = pm_op(dev, dev->type->pm, state);
402 } else if (dev->type->resume) {
403 pm_dev_dbg(dev, state, "legacy type ");
404 error = dev->type->resume(dev);
405 } 402 }
406 if (error) 403 if (error)
407 goto End; 404 goto End;
@@ -641,10 +638,6 @@ static int device_suspend(struct device *dev, pm_message_t state)
641 if (dev->type->pm) { 638 if (dev->type->pm) {
642 pm_dev_dbg(dev, state, "type "); 639 pm_dev_dbg(dev, state, "type ");
643 error = pm_op(dev, dev->type->pm, state); 640 error = pm_op(dev, dev->type->pm, state);
644 } else if (dev->type->suspend) {
645 pm_dev_dbg(dev, state, "legacy type ");
646 error = dev->type->suspend(dev, state);
647 suspend_report_result(dev->type->suspend, error);
648 } 641 }
649 if (error) 642 if (error)
650 goto End; 643 goto End;
diff --git a/include/linux/device.h b/include/linux/device.h
index 84d79cde9f7d..a4a7b10aaa48 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -289,9 +289,6 @@ struct device_type {
289 int (*uevent)(struct device *dev, struct kobj_uevent_env *env); 289 int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
290 void (*release)(struct device *dev); 290 void (*release)(struct device *dev);
291 291
292 int (*suspend)(struct device *dev, pm_message_t state);
293 int (*resume)(struct device *dev);
294
295 struct dev_pm_ops *pm; 292 struct dev_pm_ops *pm;
296}; 293};
297 294