ChangeSet 1.1504.2.46, 2003/12/12 11:57:12-08:00, [EMAIL PROTECTED] [PATCH] USB: Allow configuration #0
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. drivers/usb/core/message.c | 7 ++++++- 1 files changed, 6 insertions(+), 1 deletion(-) diff -Nru a/drivers/usb/core/message.c b/drivers/usb/core/message.c --- a/drivers/usb/core/message.c Mon Dec 29 14:21:51 2003 +++ b/drivers/usb/core/message.c Mon Dec 29 14:21:51 2003 @@ -1086,6 +1086,11 @@ 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"); @@ -1101,7 +1106,7 @@ goto out; dev->actconfig = cp; - if (!configuration) + if (!cp) dev->state = USB_STATE_ADDRESS; else { dev->state = USB_STATE_CONFIGURED; ------------------------------------------------------- This SF.net email is sponsored by: IBM Linux Tutorials. Become an expert in LINUX or just sharpen your skills. Sign up for IBM's Free Linux Tutorials. Learn everything from the bash shell to sys admin. Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel