* [PATCH][RFC] pm: remove bus_type suspend_late()/resume_early()
@ 2009-05-15 14:14 Magnus Damm
2009-05-15 14:29 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Magnus Damm @ 2009-05-15 14:14 UTC (permalink / raw)
To: linux-pm; +Cc: akpm
From: Magnus Damm <damm@igel.co.jp>
Remove the ->suspend_late() and ->resume_early() callbacks
from struct bus_type. These callbacks are legacy stuff at
this point and since there seem to be no in-tree users we
may as well remove them. New users should use dev_pm_ops.
Signed-off-by: Magnus Damm <damm@igel.co.jp>
---
This patch is almost too good to be true so there must be
something wrong. I did however spend quite some time grepping
and I could not find any in-tree users.
drivers/base/power/main.c | 7 -------
include/linux/device.h | 2 --
2 files changed, 9 deletions(-)
--- 0001/include/linux/device.h
+++ work/include/linux/device.h 2009-05-15 13:11:46.000000000 +0900
@@ -62,8 +62,6 @@ struct bus_type {
void (*shutdown)(struct device *dev);
int (*suspend)(struct device *dev, pm_message_t state);
- int (*suspend_late)(struct device *dev, pm_message_t state);
- int (*resume_early)(struct device *dev);
int (*resume)(struct device *dev);
struct dev_pm_ops *pm;
--- 0001/drivers/base/power/main.c
+++ work/drivers/base/power/main.c 2009-05-15 13:15:29.000000000 +0900
@@ -334,9 +334,6 @@ static int resume_device_noirq(struct de
if (dev->bus->pm) {
pm_dev_dbg(dev, state, "EARLY ");
error = pm_noirq_op(dev, dev->bus->pm, state);
- } else if (dev->bus->resume_early) {
- pm_dev_dbg(dev, state, "legacy EARLY ");
- error = dev->bus->resume_early(dev);
}
End:
TRACE_RESUME(error);
@@ -591,10 +588,6 @@ static int suspend_device_noirq(struct d
if (dev->bus->pm) {
pm_dev_dbg(dev, state, "LATE ");
error = pm_noirq_op(dev, dev->bus->pm, state);
- } else if (dev->bus->suspend_late) {
- pm_dev_dbg(dev, state, "legacy LATE ");
- error = dev->bus->suspend_late(dev, state);
- suspend_report_result(dev->bus->suspend_late, error);
}
return error;
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH][RFC] pm: remove bus_type suspend_late()/resume_early()
2009-05-15 14:14 [PATCH][RFC] pm: remove bus_type suspend_late()/resume_early() Magnus Damm
@ 2009-05-15 14:29 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2009-05-15 14:29 UTC (permalink / raw)
To: Magnus Damm; +Cc: linux-pm, akpm
On Friday 15 May 2009, Magnus Damm wrote:
> From: Magnus Damm <damm@igel.co.jp>
>
> Remove the ->suspend_late() and ->resume_early() callbacks
> from struct bus_type. These callbacks are legacy stuff at
> this point and since there seem to be no in-tree users we
> may as well remove them. New users should use dev_pm_ops.
OK
But please also have a look if they are not mentioned somewhere under
Documentation .
> Signed-off-by: Magnus Damm <damm@igel.co.jp>
> ---
>
> This patch is almost too good to be true so there must be
> something wrong. I did however spend quite some time grepping
> and I could not find any in-tree users.
>
> drivers/base/power/main.c | 7 -------
> include/linux/device.h | 2 --
> 2 files changed, 9 deletions(-)
>
> --- 0001/include/linux/device.h
> +++ work/include/linux/device.h 2009-05-15 13:11:46.000000000 +0900
> @@ -62,8 +62,6 @@ struct bus_type {
> void (*shutdown)(struct device *dev);
>
> int (*suspend)(struct device *dev, pm_message_t state);
> - int (*suspend_late)(struct device *dev, pm_message_t state);
> - int (*resume_early)(struct device *dev);
> int (*resume)(struct device *dev);
>
> struct dev_pm_ops *pm;
> --- 0001/drivers/base/power/main.c
> +++ work/drivers/base/power/main.c 2009-05-15 13:15:29.000000000 +0900
> @@ -334,9 +334,6 @@ static int resume_device_noirq(struct de
> if (dev->bus->pm) {
> pm_dev_dbg(dev, state, "EARLY ");
> error = pm_noirq_op(dev, dev->bus->pm, state);
> - } else if (dev->bus->resume_early) {
> - pm_dev_dbg(dev, state, "legacy EARLY ");
> - error = dev->bus->resume_early(dev);
> }
> End:
> TRACE_RESUME(error);
> @@ -591,10 +588,6 @@ static int suspend_device_noirq(struct d
> if (dev->bus->pm) {
> pm_dev_dbg(dev, state, "LATE ");
> error = pm_noirq_op(dev, dev->bus->pm, state);
> - } else if (dev->bus->suspend_late) {
> - pm_dev_dbg(dev, state, "legacy LATE ");
> - error = dev->bus->suspend_late(dev, state);
> - suspend_report_result(dev->bus->suspend_late, error);
> }
> return error;
> }
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-05-15 14:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-05-15 14:14 [PATCH][RFC] pm: remove bus_type suspend_late()/resume_early() Magnus Damm
2009-05-15 14:29 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox