]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
PM: Remove device_type suspend()/resume()
authorMagnus Damm <damm@igel.co.jp>
Thu, 4 Jun 2009 20:13:25 +0000 (22:13 +0200)
committerRafael J. Wysocki <rjw@sisk.pl>
Fri, 12 Jun 2009 19:32:32 +0000 (21:32 +0200)
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>
drivers/base/power/main.c
include/linux/device.h

index 68f9f3cecf7a8e6f5e5ea54c7cc303645e8a7314..fae725458981793649bf3e339a20394ac9859448 100644 (file)
@@ -399,9 +399,6 @@ static int device_resume(struct device *dev, pm_message_t state)
                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 *dev, pm_message_t state)
                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;
index 84d79cde9f7d6aa82665769a7ec8812eb837e7fd..a4a7b10aaa48a8b086142876272466a888069ce4 100644 (file)
@@ -289,9 +289,6 @@ struct device_type {
        int (*uevent)(struct device *dev, struct kobj_uevent_env *env);
        void (*release)(struct device *dev);
 
-       int (*suspend)(struct device *dev, pm_message_t state);
-       int (*resume)(struct device *dev);
-
        struct dev_pm_ops *pm;
 };