All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cong Wang <amwang@redhat.com>
To: "Rafael J. Wysocki" <rjw@sisk.pl>
Cc: Len Brown <len.brown@intel.com>,
	Philip Rakity <prakity@marvell.com>,
	Lucas De Marchi <lucas.demarchi@profusion.mobi>,
	netdev@vger.kernel.org, linux-mmc@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	Josh Triplett <josh@joshtriplett.org>,
	linux-pm@lists.linux-foundation.org,
	"Paul E. McKenney" <paulmck@linux.vnet.ibm.com>,
	akpm@linux-foundation.org, Chris Ball <cjb@laptop.org>,
	"David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH 4/5] pm: move pm notifiers into suspend.h
Date: Thu, 23 Jun 2011 13:03:54 +0800	[thread overview]
Message-ID: <4E02C93A.7010601__27110.7916407802$1308805533$gmane$org@redhat.com> (raw)
In-Reply-To: <201106222149.28252.rjw@sisk.pl>

[-- Attachment #1: Type: text/plain, Size: 381 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);

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



  reply	other threads:[~2011-06-23  5:03 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-22  6:35 [PATCH 0/5] notifiers: split notifier.h into subsystem headers Amerigo Wang
2011-06-22  6:35 ` [PATCH 1/5] cpu: move cpu notifiers into cpu.h Amerigo Wang
2011-06-22  6:35 ` [PATCH 2/5] net: move netdevice notifiers into netdevice.h Amerigo Wang
2011-06-22  6:35 ` [PATCH 3/5] sys: move reboot notifiers into reboot.h Amerigo Wang
2011-06-22  6:35 ` [PATCH 4/5] pm: move pm notifiers into suspend.h Amerigo Wang
2011-06-22  6:35 ` Amerigo Wang
2011-06-22 19:49   ` Rafael J. Wysocki
2011-06-22 19:49   ` Rafael J. Wysocki
2011-06-23  5:03     ` Cong Wang [this message]
2011-06-23  5:03     ` Cong Wang
2011-06-23 12:04       ` Rafael J. Wysocki
2011-06-23 12:04       ` Rafael J. Wysocki
2011-06-23 20:24       ` Pavel Machek
2011-06-23 20:24       ` Pavel Machek
2011-06-22  6:35 ` [PATCH 5/5] vt: move vt notifiers into vt.h Amerigo Wang
2011-06-22  6:42 ` [PATCH 0/5] notifiers: split notifier.h into subsystem headers David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='4E02C93A.7010601__27110.7916407802$1308805533$gmane$org@redhat.com' \
    --to=amwang@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=cjb@laptop.org \
    --cc=davem@davemloft.net \
    --cc=josh@joshtriplett.org \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-pm@lists.linux-foundation.org \
    --cc=lucas.demarchi@profusion.mobi \
    --cc=netdev@vger.kernel.org \
    --cc=paulmck@linux.vnet.ibm.com \
    --cc=prakity@marvell.com \
    --cc=rjw@sisk.pl \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.