You are not logged in.

#1 2013-10-24 03:42:47

leetow2006
Member
Registered: 2013-02-13
Posts: 21

why could not be triggered?

I paste main part,Look:

static int irq=10;
static irqreturn_t irq_handler(int data,void *dev_id)
{
	printk("<0>the data is :%d\n",data);
  	printk("<0>in the interrupt handler function\n");
   	return IRQ_HANDLED;
}
static int __init request_irq_init(void) 
{
	int result=0;
	printk("<0>into request_irq_init\n");
	result=request_irq(irq,irq_handler,IRQF_DISABLED,"A_New_Device",NULL);
        disable_irq(irq);
        enabled_irq(irq); 
	printk("<0>the result of the request_irq is: %d\n",result);   
	printk("<0>out request_irq_init\n");
	return 0; 
}

when I insert this module,I find it could not run the function irq_handler,
why?how to correct it?

Offline

Board footer

Powered by FluxBB