why could not be triggered?
Posted: Wed Oct 23, 2013 9:44 pm
I paste main part,Look:
when I insert this module,I find it could not run the function irq_handler,
why?how to correct it?
Code: Select all
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;
}
why?how to correct it?