summaryrefslogtreecommitdiff
path: root/drivers/char/misc.c
diff options
context:
space:
mode:
authorAndrzej Pietrasiewicz <andrzej.p@samsung.com>2013-12-03 18:15:30 +0400
committerFelipe Balbi <balbi@ti.com>2013-12-12 23:43:38 +0400
commite6f3862fa1ecea6579dd1727869655e88be7a5ef (patch)
tree1df971cc8d32ebf95e252e6687bd686378d03d84 /drivers/char/misc.c
parent9c2b85f4f99cb5c5f4b8e29ef15e344f93ec5be1 (diff)
downloadlinux-e6f3862fa1ecea6579dd1727869655e88be7a5ef.tar.xz
usb: gadget: FunctionFS: Remove VLAIS usage from gadget code
The use of variable length arrays in structs (VLAIS) in the Linux Kernel code precludes the use of compilers which don't implement VLAIS (for instance the Clang compiler). This alternate patch calculates offsets into the kmalloc-ed memory buffer using macros. The previous patch required multiple kmalloc and kfree calls. This version uses "group" vs "struct" since it really is not a struct and is essentially a group of VLA in a common allocated block. This version also fixes the issues pointed out by Andrzej Pietrasiewicz and Michal Nazarewicz. Signed-off-by: Mark Charlebois <charlebm@gmail.com> Signed-off-by: Behan Webster <behanw@converseincode.com> [elimination of miexed declaration and code, checkpatch cleanup] [fixes after Michal's review] Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Acked-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers/char/misc.c')
0 files changed, 0 insertions, 0 deletions