Commit 72c51615 authored by Adrian Bunk's avatar Adrian Bunk Committed by Linus Torvalds

[PATCH] drivers/char/vt*: cleanups

This patch contains the following cleanups:
- make needlessly gloval code static
- vt_ioctl.c: removed the global variable keyboard_type since noone
              did actually set it to any other value
Signed-off-by: default avatarAdrian Bunk <bunk@stusta.de>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8782a0be
......@@ -144,6 +144,7 @@ static void set_cursor(struct vc_data *vc);
static void hide_cursor(struct vc_data *vc);
static void console_callback(void *ignored);
static void blank_screen_t(unsigned long dummy);
static void set_palette(struct vc_data *vc);
static int printable; /* Is console ready for printing? */
......@@ -732,7 +733,7 @@ int vc_allocate(unsigned int currcons) /* return 0 on success */
return 0;
}
inline int resize_screen(struct vc_data *vc, int width, int height)
static inline int resize_screen(struct vc_data *vc, int width, int height)
{
/* Resizes the resolution of the display adapater */
int err = 0;
......@@ -2138,7 +2139,7 @@ struct tty_driver *console_driver;
* The console must be locked when we get here.
*/
void vt_console_print(struct console *co, const char *b, unsigned count)
static void vt_console_print(struct console *co, const char *b, unsigned count)
{
struct vc_data *vc = vc_cons[fg_console].d;
unsigned char c;
......@@ -2233,7 +2234,7 @@ static struct tty_driver *vt_console_device(struct console *c, int *index)
return console_driver;
}
struct console vt_console_driver = {
static struct console vt_console_driver = {
.name = "tty",
.write = vt_console_print,
.device = vt_console_device,
......@@ -2899,7 +2900,7 @@ void poke_blanked_console(void)
* Palettes
*/
void set_palette(struct vc_data *vc)
static void set_palette(struct vc_data *vc)
{
WARN_CONSOLE_UNLOCKED();
......@@ -2990,7 +2991,7 @@ void reset_palette(struct vc_data *vc)
#define max_font_size 65536
int con_font_get(struct vc_data *vc, struct console_font_op *op)
static int con_font_get(struct vc_data *vc, struct console_font_op *op)
{
struct console_font font;
int rc = -EINVAL;
......@@ -3045,7 +3046,7 @@ int con_font_get(struct vc_data *vc, struct console_font_op *op)
return rc;
}
int con_font_set(struct vc_data *vc, struct console_font_op *op)
static int con_font_set(struct vc_data *vc, struct console_font_op *op)
{
struct console_font font;
int rc = -EINVAL;
......@@ -3102,7 +3103,7 @@ int con_font_set(struct vc_data *vc, struct console_font_op *op)
return rc;
}
int con_font_default(struct vc_data *vc, struct console_font_op *op)
static int con_font_default(struct vc_data *vc, struct console_font_op *op)
{
struct console_font font = {.width = op->width, .height = op->height};
char name[MAX_FONT_NAME];
......@@ -3132,7 +3133,7 @@ int con_font_default(struct vc_data *vc, struct console_font_op *op)
return rc;
}
int con_font_copy(struct vc_data *vc, struct console_font_op *op)
static int con_font_copy(struct vc_data *vc, struct console_font_op *op)
{
int con = op->height;
int rc;
......
......@@ -33,7 +33,7 @@
#include <linux/kbd_diacr.h>
#include <linux/selection.h>
char vt_dont_switch;
static char vt_dont_switch;
extern struct tty_driver *console_driver;
#define VT_IS_IN_USE(i) (console_driver->ttys[i] && console_driver->ttys[i]->count)
......@@ -52,15 +52,12 @@ extern struct tty_driver *console_driver;
* to the current console is done by the main ioctl code.
*/
/* Keyboard type: Default is KB_101, but can be set by machine
* specific code.
*/
unsigned char keyboard_type = KB_101;
#ifdef CONFIG_X86
#include <linux/syscalls.h>
#endif
static void complete_change_console(struct vc_data *vc);
/*
* these are the valid i/o ports we're allowed to change. they map all the
* video ports
......@@ -414,7 +411,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
/*
* this is naive.
*/
ucval = keyboard_type;
ucval = KB_101;
goto setchar;
/*
......@@ -1066,7 +1063,7 @@ void reset_vc(struct vc_data *vc)
/*
* Performs the back end of a vt switch
*/
void complete_change_console(struct vc_data *vc)
static void complete_change_console(struct vc_data *vc)
{
unsigned char old_vc_mode;
......
......@@ -27,7 +27,6 @@ extern const int NR_TYPES;
extern const int max_vals[];
extern unsigned short *key_maps[MAX_NR_KEYMAPS];
extern unsigned short plain_map[NR_KEYS];
extern unsigned char keyboard_type;
#endif
#define MAX_NR_FUNC 256 /* max nr of strings assigned to keys */
......
......@@ -35,16 +35,11 @@ int vc_cons_allocated(unsigned int console);
int vc_resize(struct vc_data *vc, unsigned int cols, unsigned int lines);
void vc_disallocate(unsigned int console);
void reset_palette(struct vc_data *vc);
void set_palette(struct vc_data *vc);
void do_blank_screen(int entering_gfx);
void do_unblank_screen(int leaving_gfx);
void unblank_screen(void);
void poke_blanked_console(void);
int con_font_op(struct vc_data *vc, struct console_font_op *op);
int con_font_set(struct vc_data *vc, struct console_font_op *op);
int con_font_get(struct vc_data *vc, struct console_font_op *op);
int con_font_default(struct vc_data *vc, struct console_font_op *op);
int con_font_copy(struct vc_data *vc, struct console_font_op *op);
int con_set_cmap(unsigned char __user *cmap);
int con_get_cmap(unsigned char __user *cmap);
void scrollback(struct vc_data *vc, int lines);
......@@ -75,7 +70,6 @@ void con_protect_unimap(struct vc_data *vc, int rdonly);
int con_copy_unimap(struct vc_data *dst_vc, struct vc_data *src_vc);
/* vt.c */
void complete_change_console(struct vc_data *vc);
int vt_waitactive(int vt);
void change_console(struct vc_data *new_vc);
void reset_vc(struct vc_data *vc);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment