Skip to content

Commit

Permalink
Fix the epca driver to permit epca_setup() to be invoked from the ker…
Browse files Browse the repository at this point in the history
…nel cmdline

Fix the epca driver to call epca_setup() if digiepca=xxx is included on the
command line and the epca driver is built in.

epca_setup() used to be called from init/main.c in 2.2 kernels, but somewhere
along the way that call was removed but not replaced.

Signed-off-by: David Howells <dhowells@redhat.com>
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
dhowells authored and torvalds committed Jul 22, 2008
1 parent e129def commit 88e8824
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions drivers/char/epca.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,6 @@ static void pc_throttle(struct tty_struct *tty);
static void pc_unthrottle(struct tty_struct *tty);
static int pc_send_break(struct tty_struct *tty, int msec);
static void setup_empty_event(struct tty_struct *tty, struct channel *ch);
static void epca_setup(char *, int *);

static int pc_write(struct tty_struct *, const unsigned char *, int);
static int pc_init(void);
Expand Down Expand Up @@ -2513,7 +2512,8 @@ static void setup_empty_event(struct tty_struct *tty, struct channel *ch)
memoff(ch);
}

static void epca_setup(char *str, int *ints)
#ifndef MODULE
static void __init epca_setup(char *str, int *ints)
{
struct board_info board;
int index, loop, last;
Expand Down Expand Up @@ -2767,6 +2767,17 @@ static void epca_setup(char *str, int *ints)
num_cards++;
}

static int __init epca_real_setup(char *str)
{
int ints[11];

epca_setup(get_options(str, 11, ints), ints);
return 1;
}

__setup("digiepca", epca_real_setup);
#endif

enum epic_board_types {
brd_xr = 0,
brd_xem,
Expand Down

0 comments on commit 88e8824

Please sign in to comment.