Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

+4 -24
+1 -1
include/uapi/linux/usb/functionfs.h
··· 53 53 * structure. Any flags that are not recognised cause the whole block to be 54 54 * rejected with -ENOSYS. 55 55 * 56 - * Legacy descriptors format (deprecated as of 3.14): 56 + * Legacy descriptors format: 57 57 * 58 58 * | off | name | type | description | 59 59 * |-----+-----------+--------------+--------------------------------------|
+1 -5
tools/usb/Makefile
··· 6 6 CFLAGS = $(WARNINGS) -g -I../include 7 7 LDFLAGS = $(PTHREAD_LIBS) 8 8 9 - all: testusb ffs-test ffs-test-legacy 10 - 11 - ffs-test-legacy: ffs-test.c 12 - $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) -DUSE_LEGACY_DESC_HEAD 13 - 9 + all: testusb ffs-test 14 10 %: %.c 15 11 $(CC) $(CFLAGS) -o $@ $^ $(LDFLAGS) 16 12
+2 -18
tools/usb/ffs-test.c
··· 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 4 * Copyright (C) 2010 Samsung Electronics 5 5 * Author: Michal Nazarewicz <mina86@mina86.com> ··· 21 21 22 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 25 #define _BSD_SOURCE /* for endian.h */ 28 26 ··· 106 108 /******************** Descriptors and Strings *******************************/ 107 109 108 110 static const struct { 109 - struct { 110 - __le32 magic; 111 - __le32 length; 112 - #ifndef USE_LEGACY_DESC_HEAD 113 - __le32 flags; 114 - #endif 115 - __le32 fs_count; 116 - __le32 hs_count; 117 - } __attribute__((packed)) header; 111 + struct usb_functionfs_descs_head header; 118 112 struct { 119 113 struct usb_interface_descriptor intf; 120 114 struct usb_endpoint_descriptor_no_audio sink; ··· 114 124 } __attribute__((packed)) fs_descs, hs_descs; 115 125 } __attribute__((packed)) descriptors = { 116 126 .header = { 117 - #ifdef USE_LEGACY_DESC_HEAD 118 127 .magic = cpu_to_le32(FUNCTIONFS_DESCRIPTORS_MAGIC), 119 - #else 120 - .magic = cpu_to_le32(FUNCTIONFS_DESCRIPTORS_MAGIC_V2), 121 - .flags = cpu_to_le32(FUNCTIONFS_HAS_FS_DESC | 122 - FUNCTIONFS_HAS_HS_DESC), 123 - #endif 124 128 .length = cpu_to_le32(sizeof descriptors), 125 129 .fs_count = 3, 126 130 .hs_count = 3,