why could not be triggered?

Programming, for all ages and all languages.
Post Reply
leetow2003
Member
Member
Posts: 70
Joined: Fri Nov 19, 2010 6:54 pm

why could not be triggered?

Post by leetow2003 »

I paste main part,Look:

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; 
}
when I insert this module,I find it could not run the function irq_handler,
why?how to correct it?
Post Reply