* [PATCH 4/5] pm: move pm notifiers into suspend.h [not found] <1308724522-32461-1-git-send-email-amwang@redhat.com> @ 2011-06-22 6:35 ` Amerigo Wang 2011-06-22 19:49 ` Rafael J. Wysocki 0 siblings, 1 reply; 5+ messages in thread From: Amerigo Wang @ 2011-06-22 6:35 UTC (permalink / raw) To: linux-kernel Cc: akpm, netdev, Amerigo Wang, Chris Ball, Len Brown, Pavel Machek, Rafael J. Wysocki, Ohad Ben-Cohen, Linus Walleij, Philip Rakity, David S. Miller, Lucas De Marchi, Paul E. McKenney, Josh Triplett, linux-mmc, linux-pm It is not necessary to share the same notifier.h. Signed-off-by: WANG Cong <amwang@redhat.com> --- drivers/mmc/core/core.c | 3 +++ include/linux/notifier.h | 10 ++-------- include/linux/suspend.h | 8 ++++++++ 3 files changed, 13 insertions(+), 8 deletions(-) diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 68091dd..2cd4ec5 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -23,6 +23,9 @@ #include <linux/log2.h> #include <linux/regulator/consumer.h> #include <linux/pm_runtime.h> +#ifdef CONFIG_PM +#include <linux/suspend.h> +#endif #include <linux/mmc/card.h> #include <linux/mmc/host.h> diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 145c436..ae8f7d9 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h @@ -191,15 +191,9 @@ static inline int notifier_to_errno(int ret) /* reboot notifiers are defined in include/linux/reboot.h. */ -#define NETLINK_URELEASE 0x0001 /* Unicast netlink socket released */ +/* Hibernation and suspend events are defined in include/linux/suspend.h. */ -/* Hibernation and suspend events */ -#define PM_HIBERNATION_PREPARE 0x0001 /* Going to hibernate */ -#define PM_POST_HIBERNATION 0x0002 /* Hibernation finished */ -#define PM_SUSPEND_PREPARE 0x0003 /* Going to suspend the system */ -#define PM_POST_SUSPEND 0x0004 /* Suspend finished */ -#define PM_RESTORE_PREPARE 0x0005 /* Going to restore a saved image */ -#define PM_POST_RESTORE 0x0006 /* Restore failed */ +#define NETLINK_URELEASE 0x0001 /* Unicast netlink socket released */ /* Console keyboard events. * Note: KBD_KEYCODE is always sent before KBD_UNBOUND_KEYCODE, KBD_UNICODE and diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 083ffea..95bc81c 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -260,6 +260,14 @@ static inline int hibernate(void) { return -ENOSYS; } static inline bool system_entering_hibernation(void) { return false; } #endif /* CONFIG_HIBERNATION */ +/* Hibernation and suspend events */ +#define PM_HIBERNATION_PREPARE 0x0001 /* Going to hibernate */ +#define PM_POST_HIBERNATION 0x0002 /* Hibernation finished */ +#define PM_SUSPEND_PREPARE 0x0003 /* Going to suspend the system */ +#define PM_POST_SUSPEND 0x0004 /* Suspend finished */ +#define PM_RESTORE_PREPARE 0x0005 /* Going to restore a saved image */ +#define PM_POST_RESTORE 0x0006 /* Restore failed */ + #ifdef CONFIG_PM_SLEEP void save_processor_state(void); void restore_processor_state(void); -- 1.7.4.4 ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 4/5] pm: move pm notifiers into suspend.h 2011-06-22 6:35 ` [PATCH 4/5] pm: move pm notifiers into suspend.h Amerigo Wang @ 2011-06-22 19:49 ` Rafael J. Wysocki 2011-06-23 5:03 ` Cong Wang 0 siblings, 1 reply; 5+ messages in thread From: Rafael J. Wysocki @ 2011-06-22 19:49 UTC (permalink / raw) To: Amerigo Wang Cc: linux-kernel, akpm, netdev, Chris Ball, Len Brown, Pavel Machek, Ohad Ben-Cohen, Linus Walleij, Philip Rakity, David S. Miller, Lucas De Marchi, Paul E. McKenney, Josh Triplett, linux-mmc, linux-pm On Wednesday, June 22, 2011, Amerigo Wang wrote: > It is not necessary to share the same notifier.h. > > Signed-off-by: WANG Cong <amwang@redhat.com> > > --- > drivers/mmc/core/core.c | 3 +++ > include/linux/notifier.h | 10 ++-------- > include/linux/suspend.h | 8 ++++++++ > 3 files changed, 13 insertions(+), 8 deletions(-) > > diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c > index 68091dd..2cd4ec5 100644 > --- a/drivers/mmc/core/core.c > +++ b/drivers/mmc/core/core.c > @@ -23,6 +23,9 @@ > #include <linux/log2.h> > #include <linux/regulator/consumer.h> > #include <linux/pm_runtime.h> > +#ifdef CONFIG_PM > +#include <linux/suspend.h> > +#endif I don't think the #ifdef in necessary. Any dependencies on CONFIG_PM (or CONFIG_SUSPEND etc.) should be taken care of inside of suspend.h. This file should be fixed if they aren't. > #include <linux/mmc/card.h> > #include <linux/mmc/host.h> > diff --git a/include/linux/notifier.h b/include/linux/notifier.h > index 145c436..ae8f7d9 100644 > --- a/include/linux/notifier.h > +++ b/include/linux/notifier.h > @@ -191,15 +191,9 @@ static inline int notifier_to_errno(int ret) > > /* reboot notifiers are defined in include/linux/reboot.h. */ > > -#define NETLINK_URELEASE 0x0001 /* Unicast netlink socket released */ > +/* Hibernation and suspend events are defined in include/linux/suspend.h. */ > > -/* Hibernation and suspend events */ > -#define PM_HIBERNATION_PREPARE 0x0001 /* Going to hibernate */ > -#define PM_POST_HIBERNATION 0x0002 /* Hibernation finished */ > -#define PM_SUSPEND_PREPARE 0x0003 /* Going to suspend the system */ > -#define PM_POST_SUSPEND 0x0004 /* Suspend finished */ > -#define PM_RESTORE_PREPARE 0x0005 /* Going to restore a saved image */ > -#define PM_POST_RESTORE 0x0006 /* Restore failed */ > +#define NETLINK_URELEASE 0x0001 /* Unicast netlink socket released */ > > /* Console keyboard events. > * Note: KBD_KEYCODE is always sent before KBD_UNBOUND_KEYCODE, KBD_UNICODE and > diff --git a/include/linux/suspend.h b/include/linux/suspend.h > index 083ffea..95bc81c 100644 > --- a/include/linux/suspend.h > +++ b/include/linux/suspend.h > @@ -260,6 +260,14 @@ static inline int hibernate(void) { return -ENOSYS; } > static inline bool system_entering_hibernation(void) { return false; } > #endif /* CONFIG_HIBERNATION */ > > +/* Hibernation and suspend events */ > +#define PM_HIBERNATION_PREPARE 0x0001 /* Going to hibernate */ > +#define PM_POST_HIBERNATION 0x0002 /* Hibernation finished */ > +#define PM_SUSPEND_PREPARE 0x0003 /* Going to suspend the system */ > +#define PM_POST_SUSPEND 0x0004 /* Suspend finished */ > +#define PM_RESTORE_PREPARE 0x0005 /* Going to restore a saved image */ > +#define PM_POST_RESTORE 0x0006 /* Restore failed */ > + > #ifdef CONFIG_PM_SLEEP > void save_processor_state(void); > void restore_processor_state(void); > Thanks, Rafael ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 4/5] pm: move pm notifiers into suspend.h 2011-06-22 19:49 ` Rafael J. Wysocki @ 2011-06-23 5:03 ` Cong Wang 2011-06-23 12:04 ` Rafael J. Wysocki 2011-06-23 20:24 ` Pavel Machek 0 siblings, 2 replies; 5+ messages in thread From: Cong Wang @ 2011-06-23 5:03 UTC (permalink / raw) To: Rafael J. Wysocki Cc: linux-kernel, akpm, netdev, Chris Ball, Len Brown, Pavel Machek, Ohad Ben-Cohen, Linus Walleij, Philip Rakity, David S. Miller, Lucas De Marchi, Paul E. McKenney, Josh Triplett, linux-mmc, linux-pm [-- Attachment #1: Type: text/plain, Size: 368 bytes --] 于 2011年06月23日 03:49, Rafael J. Wysocki 写道: >> +#ifdef CONFIG_PM >> > +#include<linux/suspend.h> >> > +#endif > I don't think the #ifdef in necessary. Any dependencies on CONFIG_PM > (or CONFIG_SUSPEND etc.) should be taken care of inside of suspend.h. > This file should be fixed if they aren't. > Ok, please check the updated version below. Thanks. [-- Attachment #2: pm-move-pm-notifiers-into-suspend.h.patch --] [-- Type: text/plain, Size: 2376 bytes --] Author: Amerigo Wang <amwang@redhat.com> pm: move pm notifiers into suspend.h Signed-off-by: WANG Cong <amwang@redhat.com> --- diff --git a/drivers/mmc/core/core.c b/drivers/mmc/core/core.c index 68091dd..503dbc9 100644 --- a/drivers/mmc/core/core.c +++ b/drivers/mmc/core/core.c @@ -23,6 +23,7 @@ #include <linux/log2.h> #include <linux/regulator/consumer.h> #include <linux/pm_runtime.h> +#include <linux/suspend.h> #include <linux/mmc/card.h> #include <linux/mmc/host.h> diff --git a/include/linux/notifier.h b/include/linux/notifier.h index 145c436..ae8f7d9 100644 --- a/include/linux/notifier.h +++ b/include/linux/notifier.h @@ -191,15 +191,9 @@ static inline int notifier_to_errno(int ret) /* reboot notifiers are defined in include/linux/reboot.h. */ -#define NETLINK_URELEASE 0x0001 /* Unicast netlink socket released */ +/* Hibernation and suspend events are defined in include/linux/suspend.h. */ -/* Hibernation and suspend events */ -#define PM_HIBERNATION_PREPARE 0x0001 /* Going to hibernate */ -#define PM_POST_HIBERNATION 0x0002 /* Hibernation finished */ -#define PM_SUSPEND_PREPARE 0x0003 /* Going to suspend the system */ -#define PM_POST_SUSPEND 0x0004 /* Suspend finished */ -#define PM_RESTORE_PREPARE 0x0005 /* Going to restore a saved image */ -#define PM_POST_RESTORE 0x0006 /* Restore failed */ +#define NETLINK_URELEASE 0x0001 /* Unicast netlink socket released */ /* Console keyboard events. * Note: KBD_KEYCODE is always sent before KBD_UNBOUND_KEYCODE, KBD_UNICODE and diff --git a/include/linux/suspend.h b/include/linux/suspend.h index 083ffea..95bc81c 100644 --- a/include/linux/suspend.h +++ b/include/linux/suspend.h @@ -260,6 +260,14 @@ static inline int hibernate(void) { return -ENOSYS; } static inline bool system_entering_hibernation(void) { return false; } #endif /* CONFIG_HIBERNATION */ +/* Hibernation and suspend events */ +#define PM_HIBERNATION_PREPARE 0x0001 /* Going to hibernate */ +#define PM_POST_HIBERNATION 0x0002 /* Hibernation finished */ +#define PM_SUSPEND_PREPARE 0x0003 /* Going to suspend the system */ +#define PM_POST_SUSPEND 0x0004 /* Suspend finished */ +#define PM_RESTORE_PREPARE 0x0005 /* Going to restore a saved image */ +#define PM_POST_RESTORE 0x0006 /* Restore failed */ + #ifdef CONFIG_PM_SLEEP void save_processor_state(void); void restore_processor_state(void); ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 4/5] pm: move pm notifiers into suspend.h 2011-06-23 5:03 ` Cong Wang @ 2011-06-23 12:04 ` Rafael J. Wysocki 2011-06-23 20:24 ` Pavel Machek 1 sibling, 0 replies; 5+ messages in thread From: Rafael J. Wysocki @ 2011-06-23 12:04 UTC (permalink / raw) To: Cong Wang Cc: linux-kernel, akpm, netdev, Chris Ball, Len Brown, Pavel Machek, Ohad Ben-Cohen, Linus Walleij, Philip Rakity, David S. Miller, Lucas De Marchi, Paul E. McKenney, Josh Triplett, linux-mmc, linux-pm On Thursday, June 23, 2011, Cong Wang wrote: > 于 2011年06月23日 03:49, Rafael J. Wysocki 写道: > >> +#ifdef CONFIG_PM > >> > +#include<linux/suspend.h> > >> > +#endif > > I don't think the #ifdef in necessary. Any dependencies on CONFIG_PM > > (or CONFIG_SUSPEND etc.) should be taken care of inside of suspend.h. > > This file should be fixed if they aren't. > > > > Ok, please check the updated version below. That's fine by me. Please feel free to add my ACK to the patch. Thanks, Rafael ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 4/5] pm: move pm notifiers into suspend.h 2011-06-23 5:03 ` Cong Wang 2011-06-23 12:04 ` Rafael J. Wysocki @ 2011-06-23 20:24 ` Pavel Machek 1 sibling, 0 replies; 5+ messages in thread From: Pavel Machek @ 2011-06-23 20:24 UTC (permalink / raw) To: Cong Wang Cc: Rafael J. Wysocki, linux-kernel, akpm, netdev, Chris Ball, Len Brown, Ohad Ben-Cohen, Linus Walleij, Philip Rakity, David S. Miller, Lucas De Marchi, Paul E. McKenney, Josh Triplett, linux-mmc, linux-pm On Thu 2011-06-23 13:03:54, Cong Wang wrote: > ??? 2011???06???23??? 03:49, Rafael J. Wysocki ??????: > >>+#ifdef CONFIG_PM > >>> +#include<linux/suspend.h> > >>> +#endif > >I don't think the #ifdef in necessary. Any dependencies on CONFIG_PM > >(or CONFIG_SUSPEND etc.) should be taken care of inside of suspend.h. > >This file should be fixed if they aren't. > > > > Ok, please check the updated version below. > > Thanks. > > Author: Amerigo Wang <amwang@redhat.com> > > pm: move pm notifiers into suspend.h > > Signed-off-by: WANG Cong <amwang@redhat.com> ACK. -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2011-06-23 20:24 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <1308724522-32461-1-git-send-email-amwang@redhat.com>
2011-06-22 6:35 ` [PATCH 4/5] pm: move pm notifiers into suspend.h Amerigo Wang
2011-06-22 19:49 ` Rafael J. Wysocki
2011-06-23 5:03 ` Cong Wang
2011-06-23 12:04 ` Rafael J. Wysocki
2011-06-23 20:24 ` Pavel Machek
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox