[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <201109021402.42503.hartleys@visionengravers.com>
Date: Fri, 2 Sep 2011 14:02:42 -0700
From: H Hartley Sweeten <hartleys@...ionengravers.com>
To: Linux Kernel <linux-kernel@...r.kernel.org>
CC: <gregkh@...e.de>, <akpm@...ux-foundation.org>, <art@...ed.ca>,
<arnd@...db.de>, <jslaby@...e.cz>
Subject: [PATCH] vt_ioctl.c: fix compile error with pm_set_vt_switch()
When CONFIG_PM_SLEEP, CONFIG_VT, and CONFIG_VT_CONSOLE are not enabled
the function pm_set_vt_switch() is defined as an inline in linux/suspend.h. This causes
a compile error if CONFIG_VT is enabled.
drivers/tty/vt/vt_ioctl.c:1794: error: redefinition of 'pm_set_vt_switch'
include/linux/suspend.h:17: error: previous definition of 'pm_set_vt_switch' was here
Fix this with an #if defined guard around the function in vt_ioctl.c.
Signed-off-by: H Hartley Sweeten <hsweeten@...ionengravers.com>
Cc: Greg Kroah-Hartman <gregkh@...e.de>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Cc: Arthur Taylor <art@...ed.ca>
Cc: Arnd Bergmann <arnd@...db.de>
Cc: Jiri Slaby <jslaby@...e.cz>
---
diff --git a/drivers/tty/vt/vt_ioctl.c b/drivers/tty/vt/vt_ioctl.c
index 5e096f4..7bb1b4d 100644
--- a/drivers/tty/vt/vt_ioctl.c
+++ b/drivers/tty/vt/vt_ioctl.c
@@ -1784,6 +1784,8 @@ int vt_move_to_console(unsigned int vt, int alloc)
return prev;
}
+#if defined(CONFIG_PM_SLEEP) && defined(CONFIG_VT_CONSOLE)
+
/*
* Normally during a suspend, we allocate a new console and switch to it.
* When we resume, we switch back to the original console. This switch
@@ -1798,3 +1800,5 @@ void pm_set_vt_switch(int do_switch)
console_unlock();
}
EXPORT_SYMBOL(pm_set_vt_switch);
+
+#endif
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists