Skip to content

Commit

Permalink
genirq: Fix incorrect proc spurious output
Browse files Browse the repository at this point in the history
Since commit a1afb63(switch /proc/irq/*/spurious to seq_file) all
/proc/irq/XX/spurious files show the information of irq 0.

Current irq_spurious_proc_open() passes on NULL as the 3rd argument,
which is used as an IRQ number in irq_spurious_proc_show(), to the
single_open(). Because of this, all the /proc/irq/XX/spurious file
shows IRQ 0 information regardless of the IRQ number.

To fix the problem, irq_spurious_proc_open() must pass on the
appropreate data (IRQ number) to single_open().

Signed-off-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>
Reviewed-by: Yong Zhang <yong.zhang0@gmail.com>
LKML-Reference: <4CF4B778.90604@jp.fujitsu.com>
Cc: stable@kernel.org [2.6.33+]
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
  • Loading branch information
Kenji Kaneshige authored and Thomas Gleixner committed Dec 1, 2010
1 parent 22a5b56 commit 25c9170
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion kernel/irq/proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ static int irq_spurious_proc_show(struct seq_file *m, void *v)

static int irq_spurious_proc_open(struct inode *inode, struct file *file)
{
return single_open(file, irq_spurious_proc_show, NULL);
return single_open(file, irq_spurious_proc_show, PDE(inode)->data);
}

static const struct file_operations irq_spurious_proc_fops = {
Expand Down

0 comments on commit 25c9170

Please sign in to comment.