From: Takashi Iwai <tiwai@suse.de>
Subject: Fix kABI breakage with removing field addition to power_supply
Patch-mainline: Never, kABI
References: bsc#1051510
The patch
patches.drivers/power-remove-possible-deadlock-when-unregistering-po
adds a new field "removing" to power_supply struct, which breaks kABI.
A workaround here is to pack the old and the new bool flags into a
single field with bit fields.
Signed-off-by: Takashi Iwai <tiwai@suse.de>
---
include/linux/power_supply.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -248,8 +248,12 @@ struct power_supply {
struct delayed_work deferred_register_work;
spinlock_t changed_lock;
bool changed;
+#ifdef __GENKSYMS__
bool initialized;
- bool removing;
+#else
+ bool initialized:1;
+ bool removing:1;
+#endif
atomic_t use_cnt;
#ifdef CONFIG_THERMAL
struct thermal_zone_device *tzd;