diff options
Diffstat (limited to 'arch/um/drivers/mconsole_kern.c')
-rw-r--r-- | arch/um/drivers/mconsole_kern.c | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index 79610b5ce67e..773a134e7fdb 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
@@ -598,6 +598,11 @@ out: | |||
598 | mconsole_reply(req, err_msg, err, 0); | 598 | mconsole_reply(req, err_msg, err, 0); |
599 | } | 599 | } |
600 | 600 | ||
601 | struct mconsole_output { | ||
602 | struct list_head list; | ||
603 | struct mc_request *req; | ||
604 | }; | ||
605 | |||
601 | static DEFINE_SPINLOCK(console_lock); | 606 | static DEFINE_SPINLOCK(console_lock); |
602 | static LIST_HEAD(clients); | 607 | static LIST_HEAD(clients); |
603 | static char console_buf[MCONSOLE_MAX_DATA]; | 608 | static char console_buf[MCONSOLE_MAX_DATA]; |
@@ -622,10 +627,10 @@ static void console_write(struct console *console, const char *string, | |||
622 | return; | 627 | return; |
623 | 628 | ||
624 | list_for_each(ele, &clients){ | 629 | list_for_each(ele, &clients){ |
625 | struct mconsole_entry *entry; | 630 | struct mconsole_output *entry; |
626 | 631 | ||
627 | entry = list_entry(ele, struct mconsole_entry, list); | 632 | entry = list_entry(ele, struct mconsole_output, list); |
628 | mconsole_reply_len(&entry->request, console_buf, | 633 | mconsole_reply_len(entry->req, console_buf, |
629 | console_index, 0, 1); | 634 | console_index, 0, 1); |
630 | } | 635 | } |
631 | 636 | ||
@@ -649,10 +654,10 @@ late_initcall(mc_add_console); | |||
649 | static void with_console(struct mc_request *req, void (*proc)(void *), | 654 | static void with_console(struct mc_request *req, void (*proc)(void *), |
650 | void *arg) | 655 | void *arg) |
651 | { | 656 | { |
652 | struct mconsole_entry entry; | 657 | struct mconsole_output entry; |
653 | unsigned long flags; | 658 | unsigned long flags; |
654 | 659 | ||
655 | entry.request = *req; | 660 | entry.req = req; |
656 | list_add(&entry.list, &clients); | 661 | list_add(&entry.list, &clients); |
657 | spin_lock_irqsave(&console_lock, flags); | 662 | spin_lock_irqsave(&console_lock, flags); |
658 | 663 | ||