1. 程式人生 > >遮蔽OTG 滑鼠和鍵盤,只支援OTG U盤

遮蔽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))