[alsa-devel] [PATCH 4/9] ALSA: usb-audio: fix selector unit string index accessor

Daniel Mack daniel at caiaq.de
Mon May 31 13:35:39 CEST 2010


This is another regression from the UAC2 code refactoring.

Signed-off-by: Daniel Mack <daniel at caiaq.de>
---
 include/linux/usb/audio.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/include/linux/usb/audio.h b/include/linux/usb/audio.h
index 5d646c3..ed5cf92 100644
--- a/include/linux/usb/audio.h
+++ b/include/linux/usb/audio.h
@@ -244,7 +244,7 @@ struct uac_selector_unit_descriptor {
 static inline __u8 uac_selector_unit_iSelector(struct uac_selector_unit_descriptor *desc)
 {
 	__u8 *raw = (__u8 *) desc;
-	return raw[9 + desc->bLength - 1];
+	return raw[desc->bLength - 1];
 }
 
 /* 4.3.2.5 Feature Unit Descriptor */
-- 
1.7.1



More information about the Alsa-devel mailing list