PM: Deprecate suspend/resume in device_driver
PATCH 1/1 PM: Deprecate suspend/resume in device_driver
From: Ning Jiang <[email protected]>
Make suspend/resume callbacks in device_driver deprecated and scheduled for removal since they are not used in PM core anymore.
Legacy drivers who still use them need to move suspend/resume callbacks to dev_pm_ops.
--- include/linux/device.h | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-)
include/linux/device.h +2 -2
@@ -226,8 +226,8 @@ struct device_driver {int (*probe) (struct device *dev);int (*remove) (struct device *dev);void (*shutdown) (struct device *dev); -int (*suspend) (struct device *dev,pm_message_t state); -int (*resume) (struct device *dev); +int (*suspend) (struct device *dev,pm_message_t state)__deprecated ; +int (*resume) (struct device *dev)__deprecated ;const struct attribute_group **groups;const struct dev_pm_ops *pm;
Signature · 1 line
1.7.1
Greg KH
maintainerQuoted 7 lines · On Thu, Jun 14, 2012 at 02:42:17PM +0800, [email protected] wrote:
From: Ning Jiang <[email protected]>
Make suspend/resume callbacks in
device_driverdeprecated and scheduled for removal since they are not used in PM core anymore.Legacy drivers who still use them need to move suspend/resume callbacks to
dev_pm_ops.
How many complier warnings does this patch produce?
Please fix them before submitting this patch. The way kernel development is is that you fix the problems up with the api, you don't just mark them and hope someone else will do it for you.
Sorry, I can't take this.
greg k-h
Quoted 9 lines · Greg KH
Quoted 7 lines · On Thu, Jun 14, 2012 at 02:42:17PM +0800, [email protected] wrote:
From: Ning Jiang <[email protected]>
Make suspend/resume callbacks in
device_driverdeprecated and scheduled for removal since they are not used in PM core anymore.Legacy drivers who still use them need to move suspend/resume callbacks to
dev_pm_ops.
Quoted 7 lines
How many complier warnings does this patch produce?
Please fix them before submitting this patch. The way kernel development is is that you fix the problems up with the api, you don't just mark them and hope someone else will do it for you.
Sorry, I can't take this.
Right.
Please disregard my previous message, I sent it before reading this one.
Thanks,
Rafael
Greg KH
maintainerQuoted 12 lines · Rafael J. Wysocki
Quoted 11 lines · Greg KH
Quoted 7 lines · On Thu, Jun 14, 2012 at 02:42:17PM +0800, [email protected] wrote:
From: Ning Jiang <[email protected]>
Make suspend/resume callbacks in
device_driverdeprecated and scheduled for removal since they are not used in PM core anymore.Legacy drivers who still use them need to move suspend/resume callbacks to
dev_pm_ops.How many complier warnings does this patch produce?
Quoted 7 lines
Quoted 5 lines
Please fix them before submitting this patch. The way kernel development is is that you fix the problems up with the api, you don't just mark them and hope someone else will do it for you.
Sorry, I can't take this.
Right.
To provide a bit more "constructive" review, the proper thing is to fix up the whole kernel to never set these fields, and then just delete them. Ning, feel free to start working on that task, it's a good one to accomplish and should be pretty well defined.
thanks,
greg k-h
2012/6/15 Greg KH <[email protected]>:
Quoted 17 lines · Rafael J. Wysocki
Quoted 16 lines · Greg KH
Quoted 15 lines · On Thu, Jun 14, 2012 at 02:42:17PM +0800, [email protected] wrote:
Quoted 7 lines
From: Ning Jiang <[email protected]>
Make suspend/resume callbacks in
device_driverdeprecated and scheduled for removal since they are not used in PM core anymore.Legacy drivers who still use them need to move suspend/resume callbacks to
dev_pm_ops.How many complier warnings does this patch produce?
Please fix them before submitting this patch. The way kernel development is is that you fix the problems up with the api, you don't just mark them and hope someone else will do it for you.
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Sorry, I can't take this.
Right.
To provide a bit more "constructive" review, the proper thing is to fix up the whole kernel to never set these fields, and then just delete them. Ning, feel free to start working on that task, it's a good one to accomplish and should be pretty well defined.
All right. I'm working on it.