Revert "ANDROID: GKI: add vendor hooks to avoid unsupported usb device probing"
This reverts commit afa948d5af.
Reason for revert: This can be done in userspace directly, no need
for any kernel hooks at all. Please do this there, using the api
that the USB layer provides for you.
Change-Id: I13399dd1b35e0aa491d81c42bfefa27f1b03aea6
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
This commit is contained in:
committed by
Treehugger Robot
parent
f3284ea22b
commit
19fe9f6907
@@ -335,7 +335,6 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_get_thermal_zone_device);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_psci_tos_resident_on);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_rvh_psci_cpu_suspend);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_usb_new_device_added);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_usb_device_match_id_bypass);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_regmap_update);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_alter_mutex_list_add);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_mutex_unlock_slowpath);
|
||||
|
||||
@@ -31,7 +31,6 @@
|
||||
#include <linux/usb.h>
|
||||
#include <linux/usb/quirks.h>
|
||||
#include <linux/usb/hcd.h>
|
||||
#include <trace/hooks/usb.h>
|
||||
|
||||
#include "usb.h"
|
||||
|
||||
@@ -342,16 +341,8 @@ static int usb_probe_interface(struct device *dev)
|
||||
}
|
||||
|
||||
id = usb_match_dynamic_id(intf, driver);
|
||||
if (!id) {
|
||||
if (!id)
|
||||
id = usb_match_id(intf, driver->id_table);
|
||||
if (id) {
|
||||
bool bypass = false;
|
||||
|
||||
trace_android_vh_usb_device_match_id_bypass(intf, driver, &bypass);
|
||||
if (bypass)
|
||||
id = NULL;
|
||||
}
|
||||
}
|
||||
if (!id)
|
||||
return error;
|
||||
|
||||
@@ -896,13 +887,8 @@ static int usb_device_match(struct device *dev, struct device_driver *drv)
|
||||
usb_drv = to_usb_driver(drv);
|
||||
|
||||
id = usb_match_id(intf, usb_drv->id_table);
|
||||
if (id) {
|
||||
bool bypass = false;
|
||||
|
||||
trace_android_vh_usb_device_match_id_bypass(intf, usb_drv, &bypass);
|
||||
if (!bypass)
|
||||
return 1;
|
||||
}
|
||||
if (id)
|
||||
return 1;
|
||||
|
||||
id = usb_match_dynamic_id(intf, usb_drv);
|
||||
if (id)
|
||||
|
||||
@@ -20,15 +20,6 @@ struct usb_device;
|
||||
DECLARE_HOOK(android_vh_usb_new_device_added,
|
||||
TP_PROTO(struct usb_device *udev, int *err),
|
||||
TP_ARGS(udev, err));
|
||||
|
||||
struct usb_interface;
|
||||
struct usb_driver;
|
||||
|
||||
DECLARE_HOOK(android_vh_usb_device_match_id_bypass,
|
||||
TP_PROTO(struct usb_interface *intf,
|
||||
struct usb_driver *usb_drv,
|
||||
bool *bypass),
|
||||
TP_ARGS(intf, usb_drv, bypass));
|
||||
#endif /* _TRACE_HOOK_USB_H */
|
||||
/* This part must be outside protection */
|
||||
#include <trace/define_trace.h>
|
||||
|
||||
Reference in New Issue
Block a user