From c37d69dffcd9512e49de62fbf4b473d769fc2b8b Mon Sep 17 00:00:00 2001 From: Chen Jiahao Date: Sat, 29 Jan 2022 00:22:52 +0800 Subject: [PATCH] KABI: reserve space for several i2c structures hulk inclusion category: feature bugzilla: https://gitee.com/openeuler/kernel/issues/I4QWBF CVE: NA -------- Reserving some fields in struct i2c_bus_recovery_info, i2c_adapter, i2c_board_info and i2c_algorithm for future development. Signed-off-by: Chen Jiahao Reviewed-by: Liao Chang Signed-off-by: Zheng Zengkai --- include/linux/i2c.h | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/include/linux/i2c.h b/include/linux/i2c.h index 75b42c72d454..58a721c23eca 100644 --- a/include/linux/i2c.h +++ b/include/linux/i2c.h @@ -20,6 +20,7 @@ #include /* for struct device_node */ #include /* for swab16 */ #include +#include extern struct bus_type i2c_bus_type; extern struct device_type i2c_adapter_type; @@ -422,6 +423,8 @@ struct i2c_board_info { const struct resource *resources; unsigned int num_resources; int irq; + + KABI_RESERVE(1) }; /** @@ -547,6 +550,9 @@ struct i2c_algorithm { int (*reg_slave)(struct i2c_client *client); int (*unreg_slave)(struct i2c_client *client); #endif + + KABI_RESERVE(1) + KABI_RESERVE(2) }; /** @@ -636,6 +642,9 @@ struct i2c_bus_recovery_info { struct pinctrl *pinctrl; struct pinctrl_state *pins_default; struct pinctrl_state *pins_gpio; + + KABI_RESERVE(1) + KABI_RESERVE(2) }; int i2c_recover_bus(struct i2c_adapter *adap); @@ -726,6 +735,9 @@ struct i2c_adapter { const struct i2c_adapter_quirks *quirks; struct irq_domain *host_notify_domain; + + KABI_RESERVE(1) + KABI_RESERVE(2) }; #define to_i2c_adapter(d) container_of(d, struct i2c_adapter, dev) -- GitLab