[PATCH] vt: Remove VT-specific declarations and definitions from tty.h

MAX_NR_CONSOLES, fg_console, want_console and last_console are more of a
function of the VT layer than the TTY one.  Moving these to vt.h and vt_kern.h
allows all of the framebuffer and VT console drivers to remove their
dependency on tty.h.

[akpm@osdl.org: fix alpha build]
Signed-off-by: Jon Smirl <jonsmir@gmail.com>
Signed-off-by: Antonino Daplas <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Jon Smirl
2006-07-10 04:44:12 -07:00
committed by Linus Torvalds
parent 67eb5db587
commit a8f340e394
74 changed files with 26 additions and 78 deletions

View File

@@ -9,6 +9,7 @@
* to achieve effects such as fast scrolling by changing the origin.
*/
#include <linux/wait.h>
#include <linux/vt.h>
struct vt_struct;

View File

@@ -377,7 +377,6 @@ struct fb_cursor {
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/tty.h>
#include <linux/device.h>
#include <linux/workqueue.h>
#include <linux/notifier.h>

View File

@@ -5,16 +5,6 @@
* 'tty.h' defines some structures used by tty_io.c and some defines.
*/
/*
* These constants are also useful for user-level apps (e.g., VC
* resizing).
*/
#define MIN_NR_CONSOLES 1 /* must be at least 1 */
#define MAX_NR_CONSOLES 63 /* serial lines start at 64 */
#define MAX_NR_USER_CONSOLES 63 /* must be root to allocate above this */
/* Note: the ioctl VT_GETSTATE does not work for
consoles 16 and higher (since it returns a short) */
#ifdef __KERNEL__
#include <linux/fs.h>
#include <linux/major.h>
@@ -270,7 +260,6 @@ struct tty_struct {
extern void tty_write_flush(struct tty_struct *);
extern struct termios tty_std_termios;
extern int fg_console, last_console, want_console;
extern int kmsg_redirect;

View File

@@ -1,6 +1,16 @@
#ifndef _LINUX_VT_H
#define _LINUX_VT_H
/*
* These constants are also useful for user-level apps (e.g., VC
* resizing).
*/
#define MIN_NR_CONSOLES 1 /* must be at least 1 */
#define MAX_NR_CONSOLES 63 /* serial lines start at 64 */
#define MAX_NR_USER_CONSOLES 63 /* must be root to allocate above this */
/* Note: the ioctl VT_GETSTATE does not work for
consoles 16 and higher (since it returns a short) */
/* 0x56 is 'V', to avoid collision with termios and kd */
#define VT_OPENQRY 0x5600 /* find available vt */

View File

@@ -26,6 +26,7 @@
extern void kd_mksound(unsigned int hz, unsigned int ticks);
extern int kbd_rate(struct kbd_repeat *rep);
extern int fg_console, last_console, want_console;
/* console.c */