Revision edaf6c38344b026aec8be852bf7ddd9916eedf9e authored by Linus Torvalds on 20 April 2012, 17:38:08 UTC, committed by Linus Torvalds on 20 April 2012, 17:38:08 UTC
Pull m68k arch fixes from Greg Ungerer:
 "This contains four fixes for 3.4.  Two fix and clean up compilation
  for the nommu 68x328 CPU targets.  The other two fix the platform
  definition and multi-function pin setup of the second eth interface
  on the ColdFire 5275 SoC."

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gerg/m68knommu:
  m68knommu: make sure 2nd FEC eth interface pins are enabled on 5275 ColdFire
  m68knommu: fix id number for second eth device on 5275 ColdFire
  m68knommu: move and fix the 68VZ328 platform bootlogo.h
  m68knommu: remove the unused bootlogo.h processing for 68EZ328 and 68VZ328
2 parent s c6f5c93 + 938ed25
Raw File
interrupts.c
#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;
}
module_init(proc_interrupts_init);
back to top