From 854f9f2e6c17c32ced645275c4baeb64565acc20 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Thu, 5 Aug 2021 09:04:13 +0200 Subject: [PATCH] ANDROID: GKI: add padding to struct HID structures HID structures were not being tracked as a "stable" symbol in the past, but that looks to change with some future abi requirements. So add needed padding now, to ensure that we can support this over the long-term. Bug: 151154716 Signed-off-by: Greg Kroah-Hartman Change-Id: I8c3064fb7a19006a29dabbaf25c9ed1737f62e75 --- include/linux/hid.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/linux/hid.h b/include/linux/hid.h index d507343a9b66..9e23ae6387a8 100644 --- a/include/linux/hid.h +++ b/include/linux/hid.h @@ -26,6 +26,7 @@ #include #include #include +#include /* * We parse each description item into this structure. Short items data @@ -512,6 +513,7 @@ struct hid_report { /* tool related state */ bool tool_active; /* whether the current tool is active */ unsigned int tool; /* BTN_TOOL_* */ + ANDROID_KABI_RESERVE(1); }; #define HID_MAX_IDS 256 @@ -556,6 +558,7 @@ struct hid_input { bool registered; struct list_head reports; /* the list of reports */ unsigned int application; /* application usage for this input */ + ANDROID_KABI_RESERVE(1); }; enum hid_type { @@ -653,6 +656,9 @@ struct hid_device { /* device report descriptor */ wait_queue_head_t debug_wait; unsigned int id; /* system unique id */ + + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); }; #define to_hid_device(pdev) \ @@ -685,6 +691,7 @@ struct hid_parser { unsigned int collection_stack_size; struct hid_device *device; unsigned int scan_flags; + ANDROID_KABI_RESERVE(1); }; struct hid_class_descriptor { @@ -806,6 +813,9 @@ struct hid_driver { int (*resume)(struct hid_device *hdev); int (*reset_resume)(struct hid_device *hdev); #endif + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); + ANDROID_KABI_RESERVE(3); /* private: */ struct device_driver driver; }; @@ -853,6 +863,8 @@ struct hid_ll_driver { int (*idle)(struct hid_device *hdev, int report, int idle, int reqtype); bool (*may_wakeup)(struct hid_device *hdev); + ANDROID_KABI_RESERVE(1); + ANDROID_KABI_RESERVE(2); }; extern struct hid_ll_driver i2c_hid_ll_driver;