Skip to content

Commit

Permalink
cleanup console_print()
Browse files Browse the repository at this point in the history
console_print() is an old legacy interface mostly unused in the entire
kernel tree. It's best to clean up its existing use and let developers
use their own implementation of it as they feel fit.

Signed-off-by: Anirban Sinha <asinha@zeugmasystems.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Anirban Sinha authored and torvalds committed Sep 15, 2009
1 parent bb193c9 commit 353f6dd
Show file tree
Hide file tree
Showing 7 changed files with 11 additions and 32 deletions.
1 change: 1 addition & 0 deletions arch/ia64/kernel/head.S
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
#include <asm/mca_asm.h>
#include <linux/init.h>
#include <linux/linkage.h>
#include "head.h"

#ifdef CONFIG_HOTPLUG_CPU
#define SAL_PSR_BITS_TO_SET \
Expand Down
1 change: 1 addition & 0 deletions arch/ia64/kernel/head.h
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
extern void console_print(const char *s);
7 changes: 7 additions & 0 deletions arch/ia64/kernel/process.c
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,13 @@ show_regs (struct pt_regs *regs)
show_stack(NULL, NULL);
}

/* local support for deprecated console_print */
void
console_print(const char *s)
{
printk(KERN_EMERG "%s", s);
}

void
do_notify_resume_user(sigset_t *unused, struct sigscratch *scr, long in_syscall)
{
Expand Down
5 changes: 2 additions & 3 deletions drivers/char/serial167.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,6 @@ static int startup(struct cyclades_port *);
static void cy_throttle(struct tty_struct *);
static void cy_unthrottle(struct tty_struct *);
static void config_setup(struct cyclades_port *);
extern void console_print(const char *);
#ifdef CYCLOM_SHOW_STATUS
static void show_status(int);
#endif
Expand Down Expand Up @@ -245,7 +244,7 @@ void SP(char *data)
{
unsigned long flags;
local_irq_save(flags);
console_print(data);
printk(KERN_EMERG "%s", data);
local_irq_restore(flags);
}

Expand All @@ -255,7 +254,7 @@ void CP(char data)
unsigned long flags;
local_irq_save(flags);
scrn[0] = data;
console_print(scrn);
printk(KERN_EMERG "%c", scrn);
local_irq_restore(flags);
} /* CP */

Expand Down
19 changes: 0 additions & 19 deletions include/linux/dtlk.h
Original file line number Diff line number Diff line change
@@ -1,22 +1,3 @@
#if 0

#define TRACE_TXT(text) \
{ \
if(dtlk_trace) \
{ \
console_print(text); \
console_print("\n"); \
} \
}

#define TRACE_CHR(chr) \
{ \
if(dtlk_trace) \
console_print(chr); \
} \

#endif

#define DTLK_MINOR 0
#define DTLK_IO_EXTENT 0x02

Expand Down
4 changes: 0 additions & 4 deletions include/linux/tty.h
Original file line number Diff line number Diff line change
Expand Up @@ -519,10 +519,6 @@ extern void serial_console_init(void);

extern int pcxe_open(struct tty_struct *tty, struct file *filp);

/* printk.c */

extern void console_print(const char *);

/* vt.c */

extern int vt_ioctl(struct tty_struct *tty, struct file *file,
Expand Down
6 changes: 0 additions & 6 deletions kernel/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -1075,12 +1075,6 @@ void __sched console_conditional_schedule(void)
}
EXPORT_SYMBOL(console_conditional_schedule);

void console_print(const char *s)
{
printk(KERN_EMERG "%s", s);
}
EXPORT_SYMBOL(console_print);

void console_unblank(void)
{
struct console *c;
Expand Down

0 comments on commit 353f6dd

Please sign in to comment.