/* Match the calling driver type against the table. Returns: 0 if the device matches.  */
int usb_usual_check_type(const struct usb_device_id *id, int caller_type)
/* Match the calling driver type against the table. Returns: 0 if the device matches.  */
int usb_usual_check_type(const struct usb_device_id *id, int caller_type)
{
	int id_type = USB_US_TYPE(id->driver_info);
	if (caller_type <= 0 || caller_type >= 3)
		return -EINVAL;
	if (id_type == caller_type)
		return 0;
	if (id_type == USB_US_TYPE_NONE && caller_type == atomic_read(&usu_bias))
		return 0;
	return -ENODEV;
}