Skip to content

Commit cf70da2

Browse files
t-8chsre
authored andcommitted
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 <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Sebastian Reichel <[email protected]>
1 parent bd3ee57 commit cf70da2

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

drivers/power/supply/power_supply.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ struct device;
1313
struct device_type;
1414
struct power_supply;
1515

16+
extern int power_supply_property_is_writeable(struct power_supply *psy,
17+
enum power_supply_property psp);
18+
1619
#ifdef CONFIG_SYSFS
1720

1821
extern void power_supply_init_attrs(void);

drivers/power/supply/power_supply_core.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1231,7 +1231,6 @@ int power_supply_property_is_writeable(struct power_supply *psy,
12311231
{
12321232
return psy->desc->property_is_writeable && psy->desc->property_is_writeable(psy, psp);
12331233
}
1234-
EXPORT_SYMBOL_GPL(power_supply_property_is_writeable);
12351234

12361235
void power_supply_external_power_changed(struct power_supply *psy)
12371236
{

drivers/power/supply/power_supply_hwmon.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
#include <linux/hwmon.h>
88
#include <linux/power_supply.h>
99
#include <linux/slab.h>
10+
#include "power_supply.h"
1011

1112
struct power_supply_hwmon {
1213
struct power_supply *psy;

include/linux/power_supply.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -865,8 +865,6 @@ static inline int power_supply_set_property(struct power_supply *psy,
865865
const union power_supply_propval *val)
866866
{ return 0; }
867867
#endif
868-
extern int power_supply_property_is_writeable(struct power_supply *psy,
869-
enum power_supply_property psp);
870868
extern void power_supply_external_power_changed(struct power_supply *psy);
871869

872870
extern struct power_supply *__must_check

0 commit comments

Comments
 (0)