Skip to content

Commit

Permalink
printk: add console_cmdline.h
Browse files Browse the repository at this point in the history
Add an include file for the console_cmdline struct so that the braille
console driver can be separated.

Signed-off-by: Joe Perches <joe@perches.com>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>
Cc: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
Joe Perches authored and Linus Torvalds committed Jul 31, 2013
1 parent b9ee979 commit d197c43
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 9 deletions.
14 changes: 14 additions & 0 deletions kernel/printk/console_cmdline.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#ifndef _CONSOLE_CMDLINE_H
#define _CONSOLE_CMDLINE_H

struct console_cmdline
{
char name[8]; /* Name of the driver */
int index; /* Minor dev. to use */
char *options; /* Options for the driver */
#ifdef CONFIG_A11Y_BRAILLE_CONSOLE
char *brl_options; /* Options for braille driver */
#endif
};

#endif
12 changes: 3 additions & 9 deletions kernel/printk/printk.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
#define CREATE_TRACE_POINTS
#include <trace/events/printk.h>

#include "console_cmdline.h"

/* printk's without a loglevel use this.. */
#define DEFAULT_MESSAGE_LOGLEVEL CONFIG_DEFAULT_MESSAGE_LOGLEVEL

Expand Down Expand Up @@ -105,19 +107,11 @@ static struct console *exclusive_console;
/*
* Array of consoles built from command line options (console=)
*/
struct console_cmdline
{
char name[8]; /* Name of the driver */
int index; /* Minor dev. to use */
char *options; /* Options for the driver */
#ifdef CONFIG_A11Y_BRAILLE_CONSOLE
char *brl_options; /* Options for braille driver */
#endif
};

#define MAX_CMDLINECONSOLES 8

static struct console_cmdline console_cmdline[MAX_CMDLINECONSOLES];

static int selected_console = -1;
static int preferred_console = -1;
int console_set_on_cmdline;
Expand Down

0 comments on commit d197c43

Please sign in to comment.