From 4a286c23ac8f447f560fd633bc95c00a3967107e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 25 Jun 2020 10:48:36 +0200 Subject: [PATCH] ANDROID: GKI: USB: Gadget: add Android ABI padding to struct usb_gadget Over time, this structure is being changed a bunch to fix issues found in the gadget code as more and more people stress it. So add padding to handle any needed future changes that might occur. Of course, now that the padding is there, there never will be any need to change this structure again... Bug: 151154716 Signed-off-by: Greg Kroah-Hartman Change-Id: I496797469268cc5d3cfafdb19c141b6b6196fe72 --- include/linux/usb/gadget.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/usb/gadget.h b/include/linux/usb/gadget.h index 0ce9d9972955..16eab406ae8f 100644 --- a/include/linux/usb/gadget.h +++ b/include/linux/usb/gadget.h @@ -25,6 +25,7 @@ #include #include #include +#include #define UDC_TRACE_STR_MAX 512 @@ -498,6 +499,11 @@ struct usb_gadget { unsigned connected:1; unsigned lpm_capable:1; unsigned remote_wakeup:1; + + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); + ANDROID_KABI_RESERVE(3); + ANDROID_KABI_RESERVE(4); }; #define work_to_gadget(w) (container_of((w), struct usb_gadget, work))