hvc_console: use "*_console" nomenclature to avoid modpost warning.
The use of "hvc_con_driver" as the name for a file-static "struct console" with a ".setup" field pointing to an __init function causes a modpost warning, since a non-initdata structure points to init code. Using "hvc_console" as the name triggers the hacky "*_console" workaround in modpost to silence the warning, and is the same thing that most of the other console drivers already do. I made the same change in hvsi.c since I happened to notice it was likely to suffer from the same problem. Signed-off-by: Chris Metcalf <cmetcalf@tilera.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
This commit is contained in:
parent
32d8ad4e62
commit
4455b1191c
|
@ -194,7 +194,7 @@ static int __init hvc_console_setup(struct console *co, char *options)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct console hvc_con_driver = {
|
static struct console hvc_console = {
|
||||||
.name = "hvc",
|
.name = "hvc",
|
||||||
.write = hvc_console_print,
|
.write = hvc_console_print,
|
||||||
.device = hvc_console_device,
|
.device = hvc_console_device,
|
||||||
|
@ -220,7 +220,7 @@ static struct console hvc_con_driver = {
|
||||||
*/
|
*/
|
||||||
static int __init hvc_console_init(void)
|
static int __init hvc_console_init(void)
|
||||||
{
|
{
|
||||||
register_console(&hvc_con_driver);
|
register_console(&hvc_console);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
console_initcall(hvc_console_init);
|
console_initcall(hvc_console_init);
|
||||||
|
@ -276,8 +276,8 @@ int hvc_instantiate(uint32_t vtermno, int index, const struct hv_ops *ops)
|
||||||
* now (setup won't fail at this point). It's ok to just
|
* now (setup won't fail at this point). It's ok to just
|
||||||
* call register again if previously .setup failed.
|
* call register again if previously .setup failed.
|
||||||
*/
|
*/
|
||||||
if (index == hvc_con_driver.index)
|
if (index == hvc_console.index)
|
||||||
register_console(&hvc_con_driver);
|
register_console(&hvc_console);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -641,7 +641,7 @@ int hvc_poll(struct hvc_struct *hp)
|
||||||
}
|
}
|
||||||
for (i = 0; i < n; ++i) {
|
for (i = 0; i < n; ++i) {
|
||||||
#ifdef CONFIG_MAGIC_SYSRQ
|
#ifdef CONFIG_MAGIC_SYSRQ
|
||||||
if (hp->index == hvc_con_driver.index) {
|
if (hp->index == hvc_console.index) {
|
||||||
/* Handle the SysRq Hack */
|
/* Handle the SysRq Hack */
|
||||||
/* XXX should support a sequence */
|
/* XXX should support a sequence */
|
||||||
if (buf[i] == '\x0f') { /* ^O */
|
if (buf[i] == '\x0f') { /* ^O */
|
||||||
|
@ -909,7 +909,7 @@ static void __exit hvc_exit(void)
|
||||||
tty_unregister_driver(hvc_driver);
|
tty_unregister_driver(hvc_driver);
|
||||||
/* return tty_struct instances allocated in hvc_init(). */
|
/* return tty_struct instances allocated in hvc_init(). */
|
||||||
put_tty_driver(hvc_driver);
|
put_tty_driver(hvc_driver);
|
||||||
unregister_console(&hvc_con_driver);
|
unregister_console(&hvc_console);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
module_exit(hvc_exit);
|
module_exit(hvc_exit);
|
||||||
|
|
|
@ -1255,7 +1255,7 @@ static int __init hvsi_console_setup(struct console *console, char *options)
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct console hvsi_con_driver = {
|
static struct console hvsi_console = {
|
||||||
.name = "hvsi",
|
.name = "hvsi",
|
||||||
.write = hvsi_console_print,
|
.write = hvsi_console_print,
|
||||||
.device = hvsi_console_device,
|
.device = hvsi_console_device,
|
||||||
|
@ -1308,7 +1308,7 @@ static int __init hvsi_console_init(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
if (hvsi_count)
|
if (hvsi_count)
|
||||||
register_console(&hvsi_con_driver);
|
register_console(&hvsi_console);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
console_initcall(hvsi_console_init);
|
console_initcall(hvsi_console_init);
|
||||||
|
|
Reference in New Issue