* Deprecate suspend/resume in device_driver
@ 2012-06-13 7:33 Ning Jiang
2012-06-14 19:11 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Ning Jiang @ 2012-06-13 7:33 UTC (permalink / raw)
To: rjw; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1424 bytes --]
The suspend/resume will not be called if they are defined in
device_driver directly,
PM core will only use suspend/resume function in dev_pm_ops. Thus we shall
mark the old suspend/resume deprecated and make them scheduled for removal.
>From efee1b349a8abcb4702d93c1c12e7f27c96fbcfc Mon Sep 17 00:00:00 2001
From: Ning Jiang <ning.n.jiang@gmail.com>
Date: Wed, 13 Jun 2012 15:00:33 +0800
Subject: [PATCH] PM: Deprecate suspend/resume in device_driver
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
[-- Attachment #2: 0001-PM-Deprecate-suspend-resume-in-device_driver.patch --]
[-- Type: application/octet-stream, Size: 1187 bytes --]
From efee1b349a8abcb4702d93c1c12e7f27c96fbcfc Mon Sep 17 00:00:00 2001
From: Ning Jiang <ning.n.jiang@gmail.com>
Date: Wed, 13 Jun 2012 15:00:33 +0800
Subject: [PATCH] PM: Deprecate suspend/resume in device_driver
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 related [flat|nested] 2+ messages in thread
* Re: Deprecate suspend/resume in device_driver
2012-06-13 7:33 Deprecate suspend/resume in device_driver Ning Jiang
@ 2012-06-14 19:11 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2012-06-14 19:11 UTC (permalink / raw)
To: Greg KH; +Cc: Ning Jiang, linux-kernel, Linux PM mailing list
On Wednesday, June 13, 2012, Ning Jiang wrote:
> The suspend/resume will not be called if they are defined in
> device_driver directly,
> PM core will only use suspend/resume function in dev_pm_ops. Thus we shall
> mark the old suspend/resume deprecated and make them scheduled for removal.
>
>
> From efee1b349a8abcb4702d93c1c12e7f27c96fbcfc Mon Sep 17 00:00:00 2001
> From: Ning Jiang <ning.n.jiang@gmail.com>
> Date: Wed, 13 Jun 2012 15:00:33 +0800
> Subject: [PATCH] PM: Deprecate suspend/resume in device_driver
>
> 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>
Greg, do you have any objections here?
Rafael
> ---
> 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;
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2012-06-14 19:06 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-06-13 7:33 Deprecate suspend/resume in device_driver Ning Jiang
2012-06-14 19:11 ` Rafael J. Wysocki
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.