All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] pm: Fix build issues in ds278* (thinkpad_acpi)
@ 2017-12-24 10:06 Ognjen Galic
  2017-12-24 10:57   ` [Devel] " kbuild test robot
  2017-12-24 11:09   ` [Devel] " kbuild test robot
  0 siblings, 2 replies; 5+ messages in thread
From: Ognjen Galic @ 2017-12-24 10:06 UTC (permalink / raw)
  To: Andy Shevchenko, Rafael J. Wysocki, Ognjen Galić,
	Rafael J. Wysocki, Len Brown, Robert Moore, Lv Zheng,
	ACPI Devel Maling List, devel, Darren Hart, Andy Shevchenko,
	Henrique de Moraes Holschuh, Sebastian Reichel, Platform Driver,
	ibm-acpi-devel, Linux PM

This patch fixes a issue introduced by the thinkpad_acpi
and battery patch series for charging thresholds.

In that series, a new macro has been added to
"include/linux/power_supply.h:374" called to_power_supply
which is used to upcast from a struct device to a struct
power_supply. That change conflicts with the private
implementation of to_power_supply inside the ds2780
and ds2781 battery modules.

This patch removes those private implementations and
uses the new header one.

After applying the thinkpad_acpi and battery patch
series this must be applied to fix the build issues.

This patch depends on:

"[PATCH v10 2/4] pm: add to_power_supply macro to the API"

Signed-off-by: Ognjen Galic <smclt30p@gmail.com>
---
 drivers/power/supply/ds2780_battery.c | 5 -----
 drivers/power/supply/ds2781_battery.c | 5 -----
 2 files changed, 10 deletions(-)

diff --git a/drivers/power/supply/ds2780_battery.c b/drivers/power/supply/ds2780_battery.c
index e5d81b4..370e910 100644
--- a/drivers/power/supply/ds2780_battery.c
+++ b/drivers/power/supply/ds2780_battery.c
@@ -56,11 +56,6 @@ to_ds2780_device_info(struct power_supply *psy)
 	return power_supply_get_drvdata(psy);
 }
 
-static inline struct power_supply *to_power_supply(struct device *dev)
-{
-	return dev_get_drvdata(dev);
-}
-
 static inline int ds2780_battery_io(struct ds2780_device_info *dev_info,
 	char *buf, int addr, size_t count, int io)
 {
diff --git a/drivers/power/supply/ds2781_battery.c b/drivers/power/supply/ds2781_battery.c
index efe83ef..d1b5a19 100644
--- a/drivers/power/supply/ds2781_battery.c
+++ b/drivers/power/supply/ds2781_battery.c
@@ -54,11 +54,6 @@ to_ds2781_device_info(struct power_supply *psy)
 	return power_supply_get_drvdata(psy);
 }
 
-static inline struct power_supply *to_power_supply(struct device *dev)
-{
-	return dev_get_drvdata(dev);
-}
-
 static inline int ds2781_battery_io(struct ds2781_device_info *dev_info,
 	char *buf, int addr, size_t count, int io)
 {
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2017-12-24 11:09 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-24 10:06 [PATCH] pm: Fix build issues in ds278* (thinkpad_acpi) Ognjen Galic
2017-12-24 10:57 ` kbuild test robot
2017-12-24 10:57   ` [Devel] " kbuild test robot
2017-12-24 11:09 ` kbuild test robot
2017-12-24 11:09   ` [Devel] " kbuild test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.