This patch helped Jon Wilson. It allows devices to have a configuration
numbered 0, in spite of the standard convention that config #0 really
means unconfigured.
ret = -EINVAL;
goto out;
}
+
+ /* The USB spec says configuration 0 means unconfigured.
+ * But if a device includes a configuration numbered 0,
+ * we will accept it as a correctly configured state.
+ */
if (cp && configuration == 0)
dev_warn(&dev->dev, "config 0 descriptor??\n");
goto out;
dev->actconfig = cp;
- if (!configuration)
+ if (!cp)
dev->state = USB_STATE_ADDRESS;
else {
dev->state = USB_STATE_CONFIGURED;