mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] PM: Deprecate suspend/resume in device_driver
@ 2012-06-14  6:42 ning.n.jiang
  2012-06-14 15:37 ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: ning.n.jiang @ 2012-06-14  6:42 UTC (permalink / raw)
  To: rjw, gregkh; +Cc: linux-kernel, Ning Jiang

From: Ning Jiang <ning.n.jiang@gmail.com>

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.

Signed-off-by: Ning Jiang <ning.n.jiang@gmail.com>
---
 include/linux/device.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/linux/device.h b/include/linux/device.h
index e04f577..884d9a6 100644
--- a/include/linux/device.h
+++ b/include/linux/device.h
@@ -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;
-- 
1.7.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] PM: Deprecate suspend/resume in device_driver
  2012-06-14  6:42 [PATCH] PM: Deprecate suspend/resume in device_driver ning.n.jiang
@ 2012-06-14 15:37 ` Greg KH
  2012-06-14 19:15   ` Rafael J. Wysocki
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2012-06-14 15:37 UTC (permalink / raw)
  To: ning.n.jiang; +Cc: rjw, linux-kernel

On Thu, Jun 14, 2012 at 02:42:17PM +0800, ning.n.jiang@gmail.com wrote:
> From: Ning Jiang <ning.n.jiang@gmail.com>
> 
> 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.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] PM: Deprecate suspend/resume in device_driver
  2012-06-14 15:37 ` Greg KH
@ 2012-06-14 19:15   ` Rafael J. Wysocki
  2012-06-14 19:17     ` Greg KH
  0 siblings, 1 reply; 5+ messages in thread
From: Rafael J. Wysocki @ 2012-06-14 19:15 UTC (permalink / raw)
  To: Greg KH; +Cc: ning.n.jiang, linux-kernel, Linux PM mailing list

On Thursday, June 14, 2012, Greg KH wrote:
> On Thu, Jun 14, 2012 at 02:42:17PM +0800, ning.n.jiang@gmail.com wrote:
> > From: Ning Jiang <ning.n.jiang@gmail.com>
> > 
> > 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.
> 
> 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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] PM: Deprecate suspend/resume in device_driver
  2012-06-14 19:15   ` Rafael J. Wysocki
@ 2012-06-14 19:17     ` Greg KH
  2012-06-15 15:54       ` Ning Jiang
  0 siblings, 1 reply; 5+ messages in thread
From: Greg KH @ 2012-06-14 19:17 UTC (permalink / raw)
  To: Rafael J. Wysocki; +Cc: ning.n.jiang, linux-kernel, Linux PM mailing list

On Thu, Jun 14, 2012 at 09:15:47PM +0200, Rafael J. Wysocki wrote:
> On Thursday, June 14, 2012, Greg KH wrote:
> > On Thu, Jun 14, 2012 at 02:42:17PM +0800, ning.n.jiang@gmail.com wrote:
> > > From: Ning Jiang <ning.n.jiang@gmail.com>
> > > 
> > > 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.
> > 
> > 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.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] PM: Deprecate suspend/resume in device_driver
  2012-06-14 19:17     ` Greg KH
@ 2012-06-15 15:54       ` Ning Jiang
  0 siblings, 0 replies; 5+ messages in thread
From: Ning Jiang @ 2012-06-15 15:54 UTC (permalink / raw)
  To: Greg KH; +Cc: Rafael J. Wysocki, linux-kernel, Linux PM mailing list

2012/6/15 Greg KH <gregkh@linuxfoundation.org>:
> On Thu, Jun 14, 2012 at 09:15:47PM +0200, Rafael J. Wysocki wrote:
>> On Thursday, June 14, 2012, Greg KH wrote:
>> > On Thu, Jun 14, 2012 at 02:42:17PM +0800, ning.n.jiang@gmail.com wrote:
>> > > From: Ning Jiang <ning.n.jiang@gmail.com>
>> > >
>> > > 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.
>> >
>> > 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.
>
> 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.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-06-15 15:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-14  6:42 [PATCH] PM: Deprecate suspend/resume in device_driver ning.n.jiang
2012-06-14 15:37 ` Greg KH
2012-06-14 19:15   ` Rafael J. Wysocki
2012-06-14 19:17     ` Greg KH
2012-06-15 15:54       ` Ning Jiang

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®