#include <linux/fs.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/irqnr.h>
#include <linux/proc_fs.h>
#include <linux/seq_file.h>

/*
 * /proc/interrupts
 */
static void *int_seq_start(struct seq_file *f, loff_t *pos)
{
	return (*pos <= nr_irqs) ? pos : NULL;
}

static void *int_seq_next(struct seq_file *f, void *v, loff_t *pos)
{
	(*pos)++;
	if (*pos > nr_irqs)
		return NULL;
	return pos;
}

static void int_seq_stop(struct seq_file *f, void *v)
{
	/* Nothing to do */
}

static const struct seq_operations int_seq_ops = {
	.start = int_seq_start,
	.next  = int_seq_next,
	.stop  = int_seq_stop,
	.show  = show_interrupts
};

static int interrupts_open(struct inode *inode, struct file *filp)
{
	return seq_open(filp, &int_seq_ops);
}

static const struct file_operations proc_interrupts_operations = {
	.open		= interrupts_open,
	.read		= seq_read,
	.llseek		= seq_lseek,
	.release	= seq_release,
};

static int __init proc_interrupts_init(void)
{
	proc_create("interrupts", 0, NULL, &proc_interrupts_operations);
	return 0;
}
fs_initcall(proc_interrupts_init);
'master'>master</option>
<option value='nds-private-remove' selected='selected'>nds-private-remove</option>
<option value='packet-loop-back'>packet-loop-back</option>
<option value='packet-rx-pump-back'>packet-rx-pump-back</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>net-next plumbings</td><td class='sub right'>Tobias Klauser</td></tr></table>
<table class='tabs'><tr><td>
<a href='/cgit.cgi/linux/net-next.git/?h=nds-private-remove'>summary</a><a href='/cgit.cgi/linux/net-next.git/refs/?h=nds-private-remove&amp;id=e6e3fc2bd3ee03117e1ce388c897fc3b2da97d65'>refs</a><a class='active' href='/cgit.cgi/linux/net-next.git/log/net/sched/cls_bpf.c?h=nds-private-remove'>log</a><a href='/cgit.cgi/linux/net-next.git/tree/net/sched/cls_bpf.c?h=nds-private-remove&amp;id=e6e3fc2bd3ee03117e1ce388c897fc3b2da97d65'>tree</a><a href='/cgit.cgi/linux/net-next.git/commit/net/sched/cls_bpf.c?h=nds-private-remove&amp;id=e6e3fc2bd3ee03117e1ce388c897fc3b2da97d65'>commit</a><a href='/cgit.cgi/linux/net-next.git/diff/net/sched/cls_bpf.c?h=nds-private-remove&amp;id=e6e3fc2bd3ee03117e1ce388c897fc3b2da97d65'>diff</a></td><td class='form'><form class='right' method='get' action='/cgit.cgi/linux/net-next.git/log/net/sched/cls_bpf.c'>
<input type='hidden' name='h' value='nds-private-remove'/><input type='hidden' name='id' value='e6e3fc2bd3ee03117e1ce388c897fc3b2da97d65'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/cgit.cgi/linux/net-next.git/log/?h=nds-private-remove&amp;id=e6e3fc2bd3ee03117e1ce388c897fc3b2da97d65'>root</a>/<a href='/cgit.cgi/linux/net-next.git/log/net?h=nds-private-remove&amp;id=e6e3fc2bd3ee03117e1ce388c897fc3b2da97d65'>net</a>/<a href='/cgit.cgi/linux/net-next.git/log/net/sched?h=nds-private-remove&amp;id=e6e3fc2bd3ee03117e1ce388c897fc3b2da97d65'>sched</a>/<a href='/cgit.cgi/linux/net-next.git/log/net/sched/cls_bpf.c?h=nds-private-remove&amp;id=e6e3fc2bd3ee03117e1ce388c897fc3b2da97d65'>cls_bpf.c</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/cgit.cgi/linux/net-next.git/log/net/sched/cls_bpf.c?h=nds-private-remove&amp;id=e6e3fc2bd3ee03117e1ce388c897fc3b2da97d65&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th><th class='left'>Files</th><th class='left'>Lines</th></tr>