Skip to content

Commit 88e8824

Browse files
dhowellstorvalds
authored andcommitted
Fix the epca driver to permit epca_setup() to be invoked from the kernel 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>
1 parent e129def commit 88e8824

File tree

1 file changed

+13
-2
lines changed

1 file changed

+13
-2
lines changed

drivers/char/epca.c

+13-2
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,6 @@ static void pc_throttle(struct tty_struct *tty);
186186
static void pc_unthrottle(struct tty_struct *tty);
187187
static int pc_send_break(struct tty_struct *tty, int msec);
188188
static void setup_empty_event(struct tty_struct *tty, struct channel *ch);
189-
static void epca_setup(char *, int *);
190189

191190
static int pc_write(struct tty_struct *, const unsigned char *, int);
192191
static int pc_init(void);
@@ -2513,7 +2512,8 @@ static void setup_empty_event(struct tty_struct *tty, struct channel *ch)
25132512
memoff(ch);
25142513
}
25152514

2516-
static void epca_setup(char *str, int *ints)
2515+
#ifndef MODULE
2516+
static void __init epca_setup(char *str, int *ints)
25172517
{
25182518
struct board_info board;
25192519
int index, loop, last;
@@ -2767,6 +2767,17 @@ static void epca_setup(char *str, int *ints)
27672767
num_cards++;
27682768
}
27692769

2770+
static int __init epca_real_setup(char *str)
2771+
{
2772+
int ints[11];
2773+
2774+
epca_setup(get_options(str, 11, ints), ints);
2775+
return 1;
2776+
}
2777+
2778+
__setup("digiepca", epca_real_setup);
2779+
#endif
2780+
27702781
enum epic_board_types {
27712782
brd_xr = 0,
27722783
brd_xem,

0 commit comments

Comments
 (0)