Thread (12 messages) flat view 12 messages, 3 authors, 2011-09-27
STALE5467d

[PATCH 3/5] avrcp: use LAST element on media_info_id enum

From: Lucas De Marchi <hidden>
Date: 2011-09-15 04:21:35
Subsystem: the rest · Maintainer: Linus Torvalds

From: David Stockwell <redacted>

---
 audio/avrcp.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/audio/avrcp.c b/audio/avrcp.c
index 783ba02..f7f3924 100644
--- a/audio/avrcp.c
+++ b/audio/avrcp.c
@@ -142,6 +142,7 @@ enum media_info_id {
 	MEDIA_INFO_N_TRACKS =		5,
 	MEDIA_INFO_GENRE =		6,
 	MEDIA_INFO_CURRENT_POSITION =	7,
+	MEDIA_INFO_LAST
 };
 
 #if __BYTE_ORDER == __LITTLE_ENDIAN
@@ -890,7 +891,7 @@ static uint8_t avrcp_handle_get_element_attributes(struct media_player *mp,
 		 * Return all available information, at least
 		 * title must be returned.
 		 */
-		for (i = 1; i <= MEDIA_INFO_CURRENT_POSITION; i++) {
+		for (i = 1; i < MEDIA_INFO_LAST; i++) {
 			size = mp_get_media_attribute(mp, i,
 							&pdu->params[pos]);
 
-- 
1.7.6.1
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help