1,317
社区成员
发帖
与我相关
我的任务
分享
typedef struct {
int a;
int b;
}test_param, *pTestParam;
test_param gTestParam;
static irqreturn_t HalThreadedIrqHandler1(void *data)
{
unsigned char intStatus2 = 0;
int i , j ;
printk("HalThreadedIrqHandler1\n");
pTestParam tetstPa = (pTestParam)data; //
printk("%d ,%d\n" ,tetstPa->a , tetstPa->b);
//这里错误 ,出现Unable to handle kernel NULL pointer dereference at virtual address 0000004b
}
//
//register irq function
//
void registerIRQFunc()
{
int retStatus
gTestParam.a = 1;
gTestParam.b = 2;
retStatus = request_irq( irqNum, ThreadedIrqHandler1, IRQF_SHARED,"test_param",(void*)>estParam);
}