屏蔽OTG 鼠标和键盘,只支持OTG U盘

  • kernel-4.4/drivers/hid/usbhid/hid-core.c
static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id *
 
        dbg_hid("HID probe called for ifnum %d\n",
                        intf->altsetting->desc.bInterfaceNumber);
+       return 0; //在此直接return回去
        for (n = 0; n < interface->desc.bNumEndpoints; n++)
                if (usb_endpoint_is_int_in(&interface->endpoint[n].desc))

你可能感兴趣的:(屏蔽OTG 鼠标和键盘,只支持OTG U盘)