From 7176deb21a13166505dd6e80af9927b785612e89 Mon Sep 17 00:00:00 2001 From: Marcus Comstedt Date: Fri, 21 May 2021 13:31:42 +0200 Subject: [PATCH] Only reuse intfdata from a different ifc if the driver is the same Without this check the driver would stomp all over the intfdata owned by the mass storage driver which binds to the last interface which is a mass storage device containing the (Windows) drivers. --- src/fl2000_module.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/fl2000_module.c b/src/fl2000_module.c index 19979a9..e4c50e8 100644 --- a/src/fl2000_module.c +++ b/src/fl2000_module.c @@ -85,7 +85,8 @@ fl2000_device_probe( config = usb_dev->actconfig; for (index = 0; index < USB_MAXINTERFACES; index ++) { other_ifc = config->interface[index]; - if (other_ifc && other_ifc != ifc) { + if (other_ifc && other_ifc != ifc && + to_usb_driver(other_ifc->dev.driver) == &fl2000_driver) { dev_ctx = usb_get_intfdata(other_ifc); if (dev_ctx) break;