summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorThomas Weißschuh <linux@weissschuh.net>2024-10-05 12:06:16 +0200
committerSebastian Reichel <sebastian.reichel@collabora.com>2024-10-16 23:13:38 +0200
commitcf70da29c4993bf23df68b67a82dfa3da8234e75 (patch)
tree94d44b177bc87736e2bfcbc08915bb3059cd6575 /drivers
parentbd3ee57b9d4c58edbf6f7bba071f6e508c7ff1c6 (diff)
downloadlinux-cf70da29c4993bf23df68b67a82dfa3da8234e75.tar.gz
linux-cf70da29c4993bf23df68b67a82dfa3da8234e75.tar.bz2
linux-cf70da29c4993bf23df68b67a82dfa3da8234e75.zip
power: supply: core: unexport power_supply_property_is_writeable()
Since commit ("power: supply: Drop use_cnt check from power_supply_property_is_writeable()"), this function does not check use_cnt anymore, making it unsuitable for general usage. As it is only used by the psy core anyways, remove it from the public header and unexport it to avoid misusage. Signed-off-by: Thomas Weißschuh <linux@weissschuh.net> Link: https://lore.kernel.org/r/20241005-power-supply-cleanups-v1-2-45303b2d0a4d@weissschuh.net Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/power/supply/power_supply.h3
-rw-r--r--drivers/power/supply/power_supply_core.c1
-rw-r--r--drivers/power/supply/power_supply_hwmon.c1
3 files changed, 4 insertions, 1 deletions
diff --git a/drivers/power/supply/power_supply.h b/drivers/power/supply/power_supply.h
index 3cbafc58bdad..1bc57615ba68 100644
--- a/drivers/power/supply/power_supply.h
+++ b/drivers/power/supply/power_supply.h
@@ -13,6 +13,9 @@ struct device;
struct device_type;
struct power_supply;
+extern int power_supply_property_is_writeable(struct power_supply *psy,
+ enum power_supply_property psp);
+
#ifdef CONFIG_SYSFS
extern void power_supply_init_attrs(void);
diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c
index e0c87a08bc26..16085eff0084 100644
--- a/drivers/power/supply/power_supply_core.c
+++ b/drivers/power/supply/power_supply_core.c
@@ -1231,7 +1231,6 @@ int power_supply_property_is_writeable(struct power_supply *psy,
{
return psy->desc->property_is_writeable && psy->desc->property_is_writeable(psy, psp);
}
-EXPORT_SYMBOL_GPL(power_supply_property_is_writeable);
void power_supply_external_power_changed(struct power_supply *psy)
{
diff --git a/drivers/power/supply/power_supply_hwmon.c b/drivers/power/supply/power_supply_hwmon.c
index 6fbbfb1c685e..01be04903d7d 100644
--- a/drivers/power/supply/power_supply_hwmon.c
+++ b/drivers/power/supply/power_supply_hwmon.c
@@ -7,6 +7,7 @@
#include <linux/hwmon.h>
#include <linux/power_supply.h>
#include <linux/slab.h>
+#include "power_supply.h"
struct power_supply_hwmon {
struct power_supply *psy;