summaryrefslogtreecommitdiff
path: root/drivers/usb/storage/uas-detect.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/usb/storage/uas-detect.h')
-rw-r--r--drivers/usb/storage/uas-detect.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/storage/uas-detect.h b/drivers/usb/storage/uas-detect.h
index 28101c7e6a9f..02bf5ec957f5 100644
--- a/drivers/usb/storage/uas-detect.h
+++ b/drivers/usb/storage/uas-detect.h
@@ -38,3 +38,14 @@ static int uas_find_uas_alt_setting(struct usb_interface *intf)
return -ENODEV;
}
+
+static int uas_use_uas_driver(struct usb_interface *intf,
+ const struct usb_device_id *id)
+{
+ unsigned long flags = id->driver_info;
+
+ if (flags & US_FL_IGNORE_UAS)
+ return 0;
+
+ return uas_find_uas_alt_setting(intf) >= 0;
+}