diff options
Diffstat (limited to 'kernel/irq')
-rw-r--r-- | kernel/irq/proc.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/kernel/irq/proc.c b/kernel/irq/proc.c index b4f1674fca79..50b81b98046a 100644 --- a/kernel/irq/proc.c +++ b/kernel/irq/proc.c | |||
@@ -19,7 +19,15 @@ static struct proc_dir_entry *root_irq_dir; | |||
19 | static int irq_affinity_read_proc(char *page, char **start, off_t off, | 19 | static int irq_affinity_read_proc(char *page, char **start, off_t off, |
20 | int count, int *eof, void *data) | 20 | int count, int *eof, void *data) |
21 | { | 21 | { |
22 | int len = cpumask_scnprintf(page, count, irq_desc[(long)data].affinity); | 22 | struct irq_desc *desc = irq_desc + (long)data; |
23 | cpumask_t *mask = &desc->affinity; | ||
24 | int len; | ||
25 | |||
26 | #ifdef CONFIG_GENERIC_PENDING_IRQ | ||
27 | if (desc->status & IRQ_MOVE_PENDING) | ||
28 | mask = &desc->pending_mask; | ||
29 | #endif | ||
30 | len = cpumask_scnprintf(page, count, *mask); | ||
23 | 31 | ||
24 | if (count - len < 2) | 32 | if (count - len < 2) |
25 | return -EINVAL; | 33 | return -EINVAL; |