Skip to content

Commit e8a3807

Browse files
author
Fox Snowpatch
committed
1 parent 7170d5d commit e8a3807

File tree

19 files changed

+230
-143
lines changed

19 files changed

+230
-143
lines changed

arch/m68k/emu/nfcon.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,9 @@ static int __init nf_debug_setup(char *arg)
110110
/*
111111
* The console will be enabled when debug=nfcon is specified
112112
* as a kernel parameter. Since this is a non-standard way
113-
* of enabling consoles, it must be explicitly enabled.
113+
* of enabling consoles, it must be explicitly forced.
114114
*/
115-
nf_console.flags |= CON_ENABLED;
116-
register_console(&nf_console);
115+
register_console_force(&nf_console);
117116
}
118117

119118
return 0;

arch/powerpc/kernel/udbg.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ static void udbg_console_write(struct console *con, const char *s,
142142
static struct console udbg_console = {
143143
.name = "udbg",
144144
.write = udbg_console_write,
145-
.flags = CON_PRINTBUFFER | CON_ENABLED | CON_BOOT | CON_ANYTIME,
145+
.flags = CON_PRINTBUFFER | CON_BOOT | CON_ANYTIME,
146146
.index = 0,
147147
};
148148

@@ -163,7 +163,7 @@ void __init register_early_udbg_console(void)
163163
udbg_console.flags &= ~CON_BOOT;
164164
}
165165
early_console = &udbg_console;
166-
register_console(&udbg_console);
166+
register_console_force(&udbg_console);
167167
}
168168

169169
#if 0 /* if you want to use this as a regular output console */

arch/sparc/kernel/btext.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -301,7 +301,7 @@ static void btext_console_write(struct console *con, const char *s,
301301
static struct console btext_console = {
302302
.name = "btext",
303303
.write = btext_console_write,
304-
.flags = CON_PRINTBUFFER | CON_ENABLED | CON_BOOT | CON_ANYTIME,
304+
.flags = CON_PRINTBUFFER | CON_BOOT | CON_ANYTIME,
305305
.index = 0,
306306
};
307307

@@ -320,7 +320,7 @@ int __init btext_find_display(void)
320320
ret = btext_initialize(node);
321321
if (!ret) {
322322
btext_clearscreen();
323-
register_console(&btext_console);
323+
register_console_force(&btext_console);
324324
}
325325
return ret;
326326
}

arch/um/drivers/mconsole_kern.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -582,12 +582,11 @@ static void console_write(struct console *console, const char *string,
582582

583583
static struct console mc_console = { .name = "mc",
584584
.write = console_write,
585-
.flags = CON_ENABLED,
586585
.index = -1 };
587586

588587
static int mc_add_console(void)
589588
{
590-
register_console(&mc_console);
589+
register_console_force(&mc_console);
591590
return 0;
592591
}
593592

arch/um/kernel/kmsg_dump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ static void kmsg_dumper_stdout(struct kmsg_dumper *dumper,
3131
* expected to output the crash information.
3232
*/
3333
if (strcmp(con->name, "ttynull") != 0 &&
34-
console_is_usable(con, console_srcu_read_flags(con), true)) {
34+
console_is_usable(con, NBCON_USE_ATOMIC)) {
3535
break;
3636
}
3737
}

drivers/accessibility/braille/braille_console.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -360,7 +360,6 @@ int braille_register_console(struct console *console, int index,
360360
if (ret != 0)
361361
return ret;
362362
}
363-
console->flags |= CON_ENABLED;
364363
console->index = index;
365364
braille_co = console;
366365
register_keyboard_notifier(&keyboard_notifier_block);

drivers/hwtracing/stm/console.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ static int stm_console_link(struct stm_source_data *data)
4242

4343
strcpy(sc->console.name, "stm_console");
4444
sc->console.write = stm_console_write;
45-
sc->console.flags = CON_ENABLED | CON_PRINTBUFFER;
46-
register_console(&sc->console);
45+
sc->console.flags = CON_PRINTBUFFER;
46+
register_console_force(&sc->console);
4747

4848
return 0;
4949
}

drivers/net/netconsole.c

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -588,16 +588,14 @@ static ssize_t enabled_store(struct config_item *item,
588588
}
589589

590590
if (nt->extended && !console_is_registered(&netconsole_ext)) {
591-
netconsole_ext.flags |= CON_ENABLED;
592-
register_console(&netconsole_ext);
591+
register_console_force(&netconsole_ext);
593592
}
594593

595594
/* User might be enabling the basic format target for the very
596595
* first time, make sure the console is registered.
597596
*/
598597
if (!nt->extended && !console_is_registered(&netconsole)) {
599-
netconsole.flags |= CON_ENABLED;
600-
register_console(&netconsole);
598+
register_console_force(&netconsole);
601599
}
602600

603601
/*
@@ -1919,13 +1917,12 @@ static void free_param_target(struct netconsole_target *nt)
19191917

19201918
static struct console netconsole_ext = {
19211919
.name = "netcon_ext",
1922-
.flags = CON_ENABLED | CON_EXTENDED,
1920+
.flags = CON_EXTENDED,
19231921
.write = write_ext_msg,
19241922
};
19251923

19261924
static struct console netconsole = {
19271925
.name = "netcon",
1928-
.flags = CON_ENABLED,
19291926
.write = write_msg,
19301927
};
19311928

@@ -1973,9 +1970,9 @@ static int __init init_netconsole(void)
19731970
goto undonotifier;
19741971

19751972
if (console_type_needed & CONS_EXTENDED)
1976-
register_console(&netconsole_ext);
1973+
register_console_force(&netconsole_ext);
19771974
if (console_type_needed & CONS_BASIC)
1978-
register_console(&netconsole);
1975+
register_console_force(&netconsole);
19791976
pr_info("network logging started\n");
19801977

19811978
return err;

drivers/tty/ehv_bytechan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ static struct console ehv_bc_console = {
299299
.name = "ttyEHV",
300300
.write = ehv_bc_console_write,
301301
.device = ehv_bc_console_device,
302-
.flags = CON_PRINTBUFFER | CON_ENABLED,
302+
.flags = CON_PRINTBUFFER,
303303
};
304304

305305
/*
@@ -331,7 +331,7 @@ static int __init ehv_bc_console_init(void)
331331
byte channels here, either, since we only care about one. */
332332

333333
add_preferred_console(ehv_bc_console.name, ehv_bc_console.index, NULL);
334-
register_console(&ehv_bc_console);
334+
register_console_force(&ehv_bc_console);
335335

336336
pr_info("ehv-bc: registered console driver for byte channel %u\n",
337337
stdout_bc);

drivers/tty/serial/ma35d1_serial.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,7 @@ static struct console ma35d1serial_console = {
633633
.write = ma35d1serial_console_write,
634634
.device = uart_console_device,
635635
.setup = ma35d1serial_console_setup,
636-
.flags = CON_PRINTBUFFER | CON_ENABLED,
636+
.flags = CON_PRINTBUFFER,
637637
.index = -1,
638638
.data = &ma35d1serial_reg,
639639
};
@@ -657,7 +657,7 @@ static void ma35d1serial_console_init_port(void)
657657
static int __init ma35d1serial_console_init(void)
658658
{
659659
ma35d1serial_console_init_port();
660-
register_console(&ma35d1serial_console);
660+
register_console_force(&ma35d1serial_console);
661661
return 0;
662662
}
663663
console_initcall(ma35d1serial_console_init);

0 commit comments

Comments
 (0)