Skip to contentSkip to conversation

pm: Remove to_power_supply impl in ds278*

PATCH Superseded Ognjen Galic 2 participants 2 messages Dec 31, 2017 – Jan 1, 2018

Subsystems (4)

v11 of 13 Superseded Latest is v13 →

lore
Share & tools
lore
#0 lore raw

PATCH v11 5/5 pm: Remove to_power_supply impl in ds278*

This patch fixes a issue introduced by patch:
pm: add to_power_supply macro to the API

In that patch a new macro has been defined in the power_supply.h header with the same name as the private function name in the ds278* battery modules that does the same thing, thus clashing and producing build errors.

This patch removes that private implementation.

v11:
* Fix build error pointed out by the Intel automated kernel build daemon/bot

---
 drivers/power/supply/ds2780_battery.c | 5 -----
 drivers/power/supply/ds2781_battery.c | 5 -----
 2 files changed, 10 deletions(-)
drivers/power/supply/ds2780_battery.c +0 -5
index e5d81b4..370e910 100644
@@ -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)
 {
drivers/power/supply/ds2781_battery.c +0 -5
index efe83ef..d1b5a19 100644
@@ -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)
 {
Signature · 1 line
2.7.4
#1 lore raw
Quoted 9 lines · Ognjen Galic

This patch fixes a issue introduced by patch:
pm: add to_power_supply macro to the API

In that patch a new macro has been defined in the power_supply.h header with the same name as the private function name in the ds278* battery modules that does the same thing, thus clashing and producing build errors.

This patch removes that private implementation.

Must be folded into patch 2.

Signature · 2 lines
With Best Regards,
Andy Shevchenko