Message ID | 4809717.31r3eYUQgx@kreacher |
---|---|
State | New |
Headers | show |
Series | [v1,1/2] HID: generic: Add ->match() check to __check_hid_generic() | expand |
Index: linux-pm/drivers/hid/hid-generic.c =================================================================== --- linux-pm.orig/drivers/hid/hid-generic.c +++ linux-pm/drivers/hid/hid-generic.c @@ -31,7 +31,13 @@ static int __check_hid_generic(struct de if (hdrv == &hid_generic) return 0; - return hid_match_device(hdev, hdrv) != NULL; + if (!hid_match_device(hdev, hdrv)) + return 0; + + if (hdrv->match) + return hdrv->match(hdev, false); + + return 1; } static bool hid_generic_match(struct hid_device *hdev,