From: Magnus Damm Date: Thu, 4 Jun 2009 20:13:25 +0000 (+0200) Subject: PM: Remove device_type suspend()/resume() X-Git-Tag: v2.6.31-rc1~357^2~5 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=00725787511e20dbd1fdc1fb233606120ae5c8cf;p=linux.git 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 Acked-by: Greg Kroah-Hartman Signed-off-by: Rafael J. Wysocki --- 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) 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; 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 { 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; };