git.openpandora.org
/
pandora-kernel.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[pandora-kernel.git]
/
arch
/
um
/
drivers
/
mconsole_kern.c
diff --git
a/arch/um/drivers/mconsole_kern.c
b/arch/um/drivers/mconsole_kern.c
index
7914931
..
773a134
100644
(file)
--- a/
arch/um/drivers/mconsole_kern.c
+++ b/
arch/um/drivers/mconsole_kern.c
@@
-497,7
+497,7
@@
static void mconsole_get_config(int (*get_config)(char *, char *, int,
}
error = NULL;
}
error = NULL;
- size =
sizeof(default_buf)/sizeof(default_buf[0]
);
+ size =
ARRAY_SIZE(default_buf
);
buf = default_buf;
while(1){
buf = default_buf;
while(1){
@@
-598,6
+598,11
@@
out:
mconsole_reply(req, err_msg, err, 0);
}
mconsole_reply(req, err_msg, err, 0);
}
+struct mconsole_output {
+ struct list_head list;
+ struct mc_request *req;
+};
+
static DEFINE_SPINLOCK(console_lock);
static LIST_HEAD(clients);
static char console_buf[MCONSOLE_MAX_DATA];
static DEFINE_SPINLOCK(console_lock);
static LIST_HEAD(clients);
static char console_buf[MCONSOLE_MAX_DATA];
@@
-622,10
+627,10
@@
static void console_write(struct console *console, const char *string,
return;
list_for_each(ele, &clients){
return;
list_for_each(ele, &clients){
- struct mconsole_
entry
*entry;
+ struct mconsole_
output
*entry;
- entry = list_entry(ele, struct mconsole_
entry
, list);
- mconsole_reply_len(
&entry->request
, console_buf,
+ entry = list_entry(ele, struct mconsole_
output
, list);
+ mconsole_reply_len(
entry->req
, console_buf,
console_index, 0, 1);
}
console_index, 0, 1);
}
@@
-649,10
+654,10
@@
late_initcall(mc_add_console);
static void with_console(struct mc_request *req, void (*proc)(void *),
void *arg)
{
static void with_console(struct mc_request *req, void (*proc)(void *),
void *arg)
{
- struct mconsole_
entry
entry;
+ struct mconsole_
output
entry;
unsigned long flags;
unsigned long flags;
- entry.req
uest = *
req;
+ entry.req
=
req;
list_add(&entry.list, &clients);
spin_lock_irqsave(&console_lock, flags);
list_add(&entry.list, &clients);
spin_lock_irqsave(&console_lock, flags);
@@
-777,7
+782,7
@@
static int mconsole_init(void)
register_reboot_notifier(&reboot_notifier);
err = um_request_irq(MCONSOLE_IRQ, sock, IRQ_READ, mconsole_interrupt,
register_reboot_notifier(&reboot_notifier);
err = um_request_irq(MCONSOLE_IRQ, sock, IRQ_READ, mconsole_interrupt,
-
SA_INTERRUPT | SA_SHIRQ | SA
_SAMPLE_RANDOM,
+
IRQF_DISABLED | IRQF_SHARED | IRQF
_SAMPLE_RANDOM,
"mconsole", (void *)sock);
if (err){
printk("Failed to get IRQ for management console\n");
"mconsole", (void *)sock);
if (err){
printk("Failed to get IRQ for management console\n");