예제 #1
0
static void fbx_kybd_connect2inputsys(void)
{  
    rd->fbx_kybd_idev = create_inputdev_instance();

    if (rd->fbx_kybd_idev) {
        if (input_register_device(rd->fbx_kybd_idev) != 0) {
            dev_err(rd->fbx_kybd_pdev, "Fail to register input device for %s\n", fbx_kybd_name);
            
            input_free_device(rd->fbx_kybd_idev);
            rd->fbx_kybd_idev = NULL;
        }
    }
}
예제 #2
0
static void Q7x27_kybd_connect2inputsys(struct work_struct *work)
{
	struct Q7x27_kybd_record *kbdrec =
		container_of(work, struct Q7x27_kybd_record, kb_cmdq.work);	

	kbdrec->Q7x27_kybd_idev = create_inputdev_instance(kbdrec);
	if (kbdrec->Q7x27_kybd_idev) {
		if (input_register_device(kbdrec->Q7x27_kybd_idev) != 0) {
			//printk(KERN_ERR "Failed to register with"
			//	" input system\n");
			fih_printk(Q7x27_kybd_debug_mask, FIH_DEBUG_ZONE_G0,"Failed to register with input system\n");
			input_free_device(kbdrec->Q7x27_kybd_idev);
		}
	}
}