pm: remove device_type suspend()/resume()
Subsystems (4)
RFC PATCH 1/1 pm: remove device_type suspend()/resume()
From: Magnus Damm <[email protected]>
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.
---
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(-)
drivers/base/power/main.c +0 -7
@@ -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 deviceif (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;
include/linux/device.h +0 -3
@@ -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; };
Quoted 8 lines · Magnus Damm
From: Magnus Damm <[email protected]>
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 structdev_pm_ops.Signed-off-by Magnus Damm <[email protected]>
This is fine by me.
Greg, Pavel, Alan, any objections?
Rafael
Quoted 43 lines
---
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(-)drivers/base/power/main.c +0
-7@@ -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 deviceif (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;include/linux/device.h +0
-3@@ -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; };
Quoted 8 lines · Rafael J. Wysocki
Quoted 7 lines · Magnus Damm
From: Magnus Damm <[email protected]>
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 structdev_pm_ops.
Quoted 5 lines
Quoted 1 line
Signed-off-by Magnus Damm <[email protected]>This is fine by me.
Greg, Pavel, Alan, any objections?
No objections from me.
Alan Stern
Quoted 8 lines · Rafael J. Wysocki
Quoted 7 lines · Magnus Damm
From: Magnus Damm <[email protected]>
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 structdev_pm_ops.
Quoted 5 lines
Quoted 1 line
Signed-off-by Magnus Damm <[email protected]>This is fine by me.
Greg, Pavel, Alan, any objections?
Ok with me.
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
Greg KH
Acked-byQuoted 8 lines · Rafael J. Wysocki
Quoted 7 lines · Magnus Damm
From: Magnus Damm <[email protected]>
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 structdev_pm_ops.
Quoted 5 lines
Quoted 1 line
Signed-off-by Magnus Damm <[email protected]>This is fine by me.
Greg, Pavel, Alan, any objections?
Nope:
Quoted 9 lines · Greg KH
Quoted 8 lines · Rafael J. Wysocki
Quoted 7 lines · Magnus Damm
From: Magnus Damm <[email protected]>
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 structdev_pm_ops.
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Signed-off-by Magnus Damm <[email protected]>This is fine by me.
Greg, Pavel, Alan, any objections?
Nope:
Great, thanks!
if you don't mind, I'm going to take it to my tree.
Best,
Rafael