]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
power: supply: core: unexport power_supply_property_is_writeable()
authorThomas Weißschuh <linux@weissschuh.net>
Sat, 5 Oct 2024 10:06:16 +0000 (12:06 +0200)
committerSebastian Reichel <sebastian.reichel@collabora.com>
Wed, 16 Oct 2024 21:13:38 +0000 (23:13 +0200)
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>
drivers/power/supply/power_supply.h
drivers/power/supply/power_supply_core.c
drivers/power/supply/power_supply_hwmon.c
include/linux/power_supply.h

index 3cbafc58bdad0b9766441fa22981e5cf15870c80..1bc57615ba68fb33e5b77f720e454dbba6daa291 100644 (file)
@@ -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);
index e0c87a08bc26dbf7cfed2c1ff82cf9302ddd6823..16085eff008442ecd04016cd12c2854a0230d9c6 100644 (file)
@@ -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)
 {
index 6fbbfb1c685e6c7fde41ea2fa88a557ed6dda2a1..01be04903d7d2465ae2acb9eeb0b55a87868bb87 100644 (file)
@@ -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;
index 14eedefb3ac85ce6d1da351b64c27a4eae549305..c1d6cb7f4c40e7162948820e824db1ef6df9f315 100644 (file)
@@ -865,8 +865,6 @@ static inline int power_supply_set_property(struct power_supply *psy,
                            const union power_supply_propval *val)
 { return 0; }
 #endif
-extern int power_supply_property_is_writeable(struct power_supply *psy,
-                                       enum power_supply_property psp);
 extern void power_supply_external_power_changed(struct power_supply *psy);
 
 extern struct power_supply *__must_check