#include <linux/init.h>
#include <linux/kernel.h>
-#include <linux/tty.h>
#include <linux/console.h>
#include <linux/errno.h>
#include <linux/vt_kern.h>
cursor_drawn = 0;
}
-static const char *__init sticon_startup(void)
+static const char *sticon_startup(void)
{
return "STI console";
}
return -EINVAL;
}
-static int sticon_font_op(struct vc_data *c, struct console_font_op *op)
-{
- return -ENOSYS;
-}
-
static void sticon_putc(struct vc_data *conp, int c, int ypos, int xpos)
{
- int unit = conp->vc_num;
int redraw_cursor = 0;
if (vga_is_gfx || console_blanked)
return;
-
- if (vt_cons[unit]->vc_mode != KD_TEXT)
+
+ if (conp->vc_mode != KD_TEXT)
return;
#if 0
if ((p->cursor_x == xpos) && (p->cursor_y == ypos)) {
static void sticon_putcs(struct vc_data *conp, const unsigned short *s,
int count, int ypos, int xpos)
{
- int unit = conp->vc_num;
int redraw_cursor = 0;
if (vga_is_gfx || console_blanked)
return;
- if (vt_cons[unit]->vc_mode != KD_TEXT)
+ if (conp->vc_mode != KD_TEXT)
return;
-
+
#if 0
if ((p->cursor_y == ypos) && (xpos <= p->cursor_x) &&
(p->cursor_x < (xpos + count))) {
} else {
/* vc_rows = (c->vc_rows > vc_rows) ? vc_rows : c->vc_rows; */
/* vc_cols = (c->vc_cols > vc_cols) ? vc_cols : c->vc_cols; */
- vc_resize(c->vc_num, vc_cols, vc_rows);
+ vc_resize(c, vc_cols, vc_rows);
/* vc_resize_con(vc_rows, vc_cols, c->vc_num); */
}
}
{
}
-static struct consw sti_con = {
+static const struct consw sti_con = {
+ .owner = THIS_MODULE,
.con_startup = sticon_startup,
.con_init = sticon_init,
.con_deinit = sticon_deinit,
.con_bmove = sticon_bmove,
.con_switch = sticon_switch,
.con_blank = sticon_blank,
- .con_font_op = sticon_font_op,
.con_set_palette = sticon_set_palette,
.con_scrolldelta = sticon_scrolldelta,
.con_set_origin = sticon_set_origin,
if (conswitchp == &dummy_con) {
printk(KERN_INFO "sticon: Initializing STI text console.\n");
- take_over_console(&sti_con, 0, MAX_NR_CONSOLES - 1, 1);
+ return take_over_console(&sti_con, 0, MAX_NR_CONSOLES - 1, 1);
}
return 0;
}