From mboxrd@z Thu Jan 1 00:00:00 1970 From: Magnus Damm Subject: [PATCH][RFC] pm: remove device_type suspend()/resume() Date: Mon, 01 Jun 2009 19:38:36 +0900 Message-ID: <20090601103836.10959.43392.sendpatchset@rx1.opensource.se> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-pm-bounces@lists.linux-foundation.org Errors-To: linux-pm-bounces@lists.linux-foundation.org To: linux-pm@lists.linux-foundation.org Cc: gregkh@suse.de List-Id: linux-pm@vger.kernel.org From: Magnus Damm 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 --- 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; };