From: Geert Uytterhoeven <geert@linux-m68k.org>
To: Marcelo Tosatti <marcelo@conectiva.com.br>,
Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linux Kernel Development <linux-kernel@vger.kernel.org>,
Geert Uytterhoeven <geert@linux-m68k.org>
Subject: [PATCH] Duplicate PROC_CONSOLE()
Date: Sun, 13 Apr 2003 15:04:48 +0200 [thread overview]
Message-ID: <200304131304.h3DD4mEZ001257@callisto.of.borg> (raw)
Duplicate PROC_CONSOLE():
- Remove local copy of PROC_CONSOLE() in drivers/video/modedb.c. A global one
is already provided by drivers/video/fbcon.c
- Add missing multiple include protectors to <linux/console_struct.h>
--- linux-2.4.x/drivers/video/modedb.c Sun Dec 23 11:25:09 2001
+++ linux-m68k-2.4.x/drivers/video/modedb.c Wed Apr 9 13:47:05 2003
@@ -16,6 +16,7 @@
#include <linux/fb.h>
#include <linux/console_struct.h>
#include <linux/sched.h>
+#include <video/fbcon.h>
#undef DEBUG
@@ -255,28 +256,6 @@
return val;
}
}
-}
-
-static int PROC_CONSOLE(const struct fb_info *info)
-{
- int fgc;
-
- if (info->display_fg != NULL)
- fgc = info->display_fg->vc_num;
- else
- return -1;
-
- if (!current->tty)
- return fgc;
-
- if (current->tty->driver.type != TTY_DRIVER_TYPE_CONSOLE)
- /* XXX Should report error here? */
- return fgc;
-
- if (MINOR(current->tty->device) < 1)
- return fgc;
-
- return MINOR(current->tty->device) - 1;
}
--- linux-2.4.x/include/linux/console_struct.h Thu Sep 20 10:51:46 2001
+++ linux-m68k-2.4.x/include/linux/console_struct.h Wed Apr 9 13:54:58 2003
@@ -9,6 +9,9 @@
* to achieve effects such as fast scrolling by changing the origin.
*/
+#ifndef _LINUX_CONSOLE_STRUCT_H_
+#define _LINUX_CONSOLE_STRUCT_H_
+
#define NPAR 16
struct vc_data {
@@ -107,3 +110,5 @@
#define CUR_DEFAULT CUR_UNDERLINE
#define CON_IS_VISIBLE(conp) (*conp->vc_display_fg == conp)
+
+#endif /* _LINUX_CONSOLE_STRUCT_H_ */
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
reply other threads:[~2003-04-13 12:55 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200304131304.h3DD4mEZ001257@callisto.of.borg \
--to=geert@linux-m68k.org \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo@conectiva.com.br \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).