diff options
author | Felipe Balbi <balbi@ti.com> | 2014-06-27 11:41:00 -0400 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-06-27 11:41:00 -0400 |
commit | 9ad7860450ea65c6bbcbd52a9a25b54b07e35941 (patch) | |
tree | b5af173777cd159b9248a8227dfbe540e8795c72 /tools/usb | |
parent | 5d881802c407d83c169c875dad88fe2bba066c33 (diff) |
Revert "tools: ffs-test: convert to new descriptor format fixing compilation error"
This reverts commit f2af74123f8c5a735248547f4286a3adc28633c1.
There is a better fix for this build error coming in a following
patch.
Signed-of-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'tools/usb')
-rw-r--r-- | tools/usb/Makefile | 6 | ||||
-rw-r--r-- | tools/usb/ffs-test.c | 20 |
2 files changed, 3 insertions, 23 deletions
diff --git a/tools/usb/Makefile b/tools/usb/Makefile index d576b3bac3cf..acf2165c04e6 100644 --- a/tools/usb/Makefile +++ b/tools/usb/Makefile | |||
@@ -6,11 +6,7 @@ WARNINGS = -Wall -Wextra | |||
6 | CFLAGS = $(WARNINGS) -g -I../include | 6 | CFLAGS = $(WARNINGS) -g -I../include |
7 | LDFLAGS = $(PTHREAD_LIBS) | 7 | LDFLAGS = $(PTHREAD_LIBS) |
8 | 8 | ||
9 | all: testusb ffs-test ffs-test-legacy | 9 | all: testusb ffs-test |
10 | |||
11 | ffs-test-legacy: ffs-test.c | ||
12 | $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) -DUSE_LEGACY_DESC_HEAD | ||
13 | |||
14 | %: %.c | 10 | %: %.c |
15 | $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) | 11 | $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) |
16 | 12 | ||
diff --git a/tools/usb/ffs-test.c b/tools/usb/ffs-test.c index 74b353d9eb50..fe1e66b6ef40 100644 --- a/tools/usb/ffs-test.c +++ b/tools/usb/ffs-test.c | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * ffs-test.c -- user mode filesystem api for usb composite function | 2 | * ffs-test.c.c -- user mode filesystem api for usb composite function |
3 | * | 3 | * |
4 | * Copyright (C) 2010 Samsung Electronics | 4 | * Copyright (C) 2010 Samsung Electronics |
5 | * Author: Michal Nazarewicz <mina86@mina86.com> | 5 | * Author: Michal Nazarewicz <mina86@mina86.com> |
@@ -21,8 +21,6 @@ | |||
21 | 21 | ||
22 | /* $(CROSS_COMPILE)cc -Wall -Wextra -g -o ffs-test ffs-test.c -lpthread */ | 22 | /* $(CROSS_COMPILE)cc -Wall -Wextra -g -o ffs-test ffs-test.c -lpthread */ |
23 | 23 | ||
24 | /* Uncomment to make the tool use legacy FFS descriptor headers. */ | ||
25 | /* #define USE_LEGACY_DESC_HEAD */ | ||
26 | 24 | ||
27 | #define _BSD_SOURCE /* for endian.h */ | 25 | #define _BSD_SOURCE /* for endian.h */ |
28 | 26 | ||
@@ -108,15 +106,7 @@ static void _msg(unsigned level, const char *fmt, ...) | |||
108 | /******************** Descriptors and Strings *******************************/ | 106 | /******************** Descriptors and Strings *******************************/ |
109 | 107 | ||
110 | static const struct { | 108 | static const struct { |
111 | struct { | 109 | struct usb_functionfs_descs_head header; |
112 | __le32 magic; | ||
113 | __le32 length; | ||
114 | #ifndef USE_LEGACY_DESC_HEAD | ||
115 | __le32 flags; | ||
116 | #endif | ||
117 | __le32 fs_count; | ||
118 | __le32 hs_count; | ||
119 | } __attribute__((packed)) header; | ||
120 | struct { | 110 | struct { |
121 | struct usb_interface_descriptor intf; | 111 | struct usb_interface_descriptor intf; |
122 | struct usb_endpoint_descriptor_no_audio sink; | 112 | struct usb_endpoint_descriptor_no_audio sink; |
@@ -124,13 +114,7 @@ static const struct { | |||
124 | } __attribute__((packed)) fs_descs, hs_descs; | 114 | } __attribute__((packed)) fs_descs, hs_descs; |
125 | } __attribute__((packed)) descriptors = { | 115 | } __attribute__((packed)) descriptors = { |
126 | .header = { | 116 | .header = { |
127 | #ifdef USE_LEGACY_DESC_HEAD | ||
128 | .magic = cpu_to_le32(FUNCTIONFS_DESCRIPTORS_MAGIC), | 117 | .magic = cpu_to_le32(FUNCTIONFS_DESCRIPTORS_MAGIC), |
129 | #else | ||
130 | .magic = cpu_to_le32(FUNCTIONFS_DESCRIPTORS_MAGIC_V2), | ||
131 | .flags = cpu_to_le32(FUNCTIONFS_HAS_FS_DESC | | ||
132 | FUNCTIONFS_HAS_HS_DESC), | ||
133 | #endif | ||
134 | .length = cpu_to_le32(sizeof descriptors), | 118 | .length = cpu_to_le32(sizeof descriptors), |
135 | .fs_count = 3, | 119 | .fs_count = 3, |
136 | .hs_count = 3, | 120 | .hs_count = 3, |