aboutsummaryrefslogtreecommitdiff
path: root/drivers/xen/manage.c
diff options
context:
space:
mode:
authorRandy Dunlap <randy.dunlap@oracle.com>2010-05-24 14:33:41 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-25 08:07:07 -0700
commitf3bc3189a001ec85c7b1119ad4aa5e39eea0f05e (patch)
tree952cc9922d06af94491ecee754d4d24f9b1e2312 /drivers/xen/manage.c
parenta321cedb12904114e2ba5041a3673ca24deb09c9 (diff)
xen: fix build when SYSRQ is disabled
Fix build error when CONFIG_MAGIC_SYSRQ is not enabled: drivers/xen/manage.c:223: error: implicit declaration of function 'handle_sysrq' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/xen/manage.c')
-rw-r--r--drivers/xen/manage.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/xen/manage.c b/drivers/xen/manage.c
index 8943b8ccee1..07e857b0de1 100644
--- a/drivers/xen/manage.c
+++ b/drivers/xen/manage.c
@@ -185,6 +185,7 @@ static void shutdown_handler(struct xenbus_watch *watch,
kfree(str);
}
+#ifdef CONFIG_MAGIC_SYSRQ
static void sysrq_handler(struct xenbus_watch *watch, const char **vec,
unsigned int len)
{
@@ -214,15 +215,16 @@ static void sysrq_handler(struct xenbus_watch *watch, const char **vec,
handle_sysrq(sysrq_key, NULL);
}
-static struct xenbus_watch shutdown_watch = {
- .node = "control/shutdown",
- .callback = shutdown_handler
-};
-
static struct xenbus_watch sysrq_watch = {
.node = "control/sysrq",
.callback = sysrq_handler
};
+#endif
+
+static struct xenbus_watch shutdown_watch = {
+ .node = "control/shutdown",
+ .callback = shutdown_handler
+};
static int setup_shutdown_watcher(void)
{
@@ -234,11 +236,13 @@ static int setup_shutdown_watcher(void)
return err;
}
+#ifdef CONFIG_MAGIC_SYSRQ
err = register_xenbus_watch(&sysrq_watch);
if (err) {
printk(KERN_ERR "Failed to set sysrq watcher\n");
return err;
}
+#endif
return 0;
}