Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 52f916bd authored by Greg Kroah-Hartman's avatar Greg Kroah-Hartman
Browse files

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: default avatarGreg Kroah-Hartman <gregkh@google.com>
Change-Id: I8dbc5f76e9eddfc5741f944168222aedacd0a8bb
parent f8b82ebf
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -25,6 +25,7 @@
#include <linux/timer.h>
#include <linux/workqueue.h>
#include <linux/mod_devicetable.h>
#include <linux/android_kabi.h>

#include <linux/atomic.h>

@@ -481,6 +482,11 @@ struct phy_device {

	void (*phy_link_change)(struct phy_device *, bool up, bool do_carrier);
	void (*adjust_link)(struct net_device *dev);

	ANDROID_KABI_RESERVE(1);
	ANDROID_KABI_RESERVE(2);
	ANDROID_KABI_RESERVE(3);
	ANDROID_KABI_RESERVE(4);
};
#define to_phy_device(d) container_of(to_mdio_device(d), \
				      struct phy_device, mdio)
@@ -660,6 +666,10 @@ struct phy_driver {
			    struct ethtool_tunable *tuna,
			    const void *data);
	int (*set_loopback)(struct phy_device *dev, bool enable);

	ANDROID_KABI_RESERVE(1);
	ANDROID_KABI_RESERVE(2);

};
#define to_phy_driver(d) container_of(to_mdio_common_driver(d),		\
				      struct phy_driver, mdiodrv)