ANDROID: GKI: phy: add Android ABI padding to some structures

Try to mitigate potential future driver core api changes by adding a
padding to stuct phy_device and struct phy_driver

Inspired by the upstream changes in 5.4.26 and 4.19.111

Bug: 151154716
Signed-off-by: Greg Kroah-Hartman <gregkh@google.com>
Change-Id: I8dbc5f76e9eddfc5741f944168222aedacd0a8bb
This commit is contained in:
Greg Kroah-Hartman
2020-03-18 09:03:38 +01:00
committed by Todd Kjos
parent 8428109739
commit 996afd72e8

View File

@@ -27,6 +27,7 @@
#include <linux/irqreturn.h>
#include <linux/iopoll.h>
#include <linux/refcount.h>
#include <linux/android_kabi.h>
#include <linux/atomic.h>
@@ -670,6 +671,11 @@ struct phy_device {
/* MACsec management functions */
const struct macsec_ops *macsec_ops;
#endif
ANDROID_KABI_RESERVE(1);
ANDROID_KABI_RESERVE(2);
ANDROID_KABI_RESERVE(3);
ANDROID_KABI_RESERVE(4);
};
static inline struct phy_device *to_phy_device(const struct device *dev)
@@ -897,6 +903,9 @@ struct phy_driver {
int (*get_sqi)(struct phy_device *dev);
/** @get_sqi_max: Get the maximum signal quality indication */
int (*get_sqi_max)(struct phy_device *dev);
ANDROID_KABI_RESERVE(1);
ANDROID_KABI_RESERVE(2);
};
#define to_phy_driver(d) container_of(to_mdio_common_driver(d), \
struct phy_driver, mdiodrv)