[PATCH 2/2] atusb: Ignore interface 1 as it is used for DFU

Stefan Schmidt stefan at datenfreihafen.org
Wed Jun 22 21:42:39 EDT 2011


---
 drivers/ieee802154/atusb.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/drivers/ieee802154/atusb.c b/drivers/ieee802154/atusb.c
index e906883..b6f9c89 100644
--- a/drivers/ieee802154/atusb.c
+++ b/drivers/ieee802154/atusb.c
@@ -272,6 +272,14 @@ static int atusb_probe(struct usb_interface *interface,
 	atusb->udev = usb_get_dev(udev);
 	usb_set_intfdata(interface, atusb);
 
+	/* Interface 1 is used for DFU ignore it in this driver to avoid
+	 * attaching to both interfaces */
+        if (interface == udev->actconfig->interface[1]) {
+                dev_info(&udev->dev,
+                         "Ignoring interface 1 reserved for DFU\n");
+                return -ENODEV;
+        }
+
 	/*
 	 * Get the static info from the device and save it ...
 	 */
-- 
1.7.5.4





More information about the discussion mailing list


interactive