Skip to contentSkip to conversation

extcon: Provide *extcon_*_notifier_all() stubs for !CONFIG_EXTCON

PATCH In review Sebastian Andrzej Siewior 2 participants 6 messages Mar 12, 2021 External connector subsystem (extcon)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 extcon: Provide *extcon_*_notifier_all() stubs for !CONFIG_EXTCON

CHARGER_MAX8997 fails to compile without CONFIG_EXTCON. There are stubs already present for *extcon_*_notifier() but are missing for the _all() variant.

Add *extcon_*_notifier_all() stubs for !CONFIG_EXTCON.

Fixes f384989e88d44 ("power: supply: max8997_charger: Set CHARGER current limit")
---
 include/linux/extcon.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)
include/linux/extcon.h +24 -0
index fd183fb9c20f7..8246307f9ed38 100644
@@ -276,6 +276,30 @@ static inline struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name)
 	return ERR_PTR(-ENODEV);
 }
 
+static inline int extcon_register_notifier_all(struct extcon_dev *edev,
+					       struct notifier_block *nb)
+{
+	return -EINVAL;
+}
+
+static inline int extcon_unregister_notifier_all(struct extcon_dev *edev,
+						 struct notifier_block *nb)
+{
+	return 0;
+}
+
+static inline int devm_extcon_register_notifier_all(struct device *dev,
+						    struct extcon_dev *edev,
+						    struct notifier_block *nb)
+{
+	return -EINVAL;
+}
+
+static inline void devm_extcon_unregister_notifier_all(struct device *dev,
+						       struct extcon_dev *edev,
+						       struct notifier_block *nb)
+{ }
+
 static inline struct extcon_dev *extcon_find_edev_by_node(struct device_node *node)
 {
 	return ERR_PTR(-ENODEV);
Signature · 1 line
2.30.2
#1 lore raw
Quoted 5 lines · Sebastian Andrzej Siewior

CHARGER_MAX8997 fails to compile without CONFIG_EXTCON. There are stubs already present for *extcon_*_notifier() but are missing for the _all() variant.

Quoted 7 lines

Add *extcon_*_notifier_all() stubs for !CONFIG_EXTCON.

Fixes f384989e88d44 ("power: supply: max8997_charger: Set CHARGER current limit")
---
 include/linux/extcon.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

Thanks for the patch.

Fix was sent some time ago and is already in extcon tree:
https://lore.kernel.org/lkml/[email protected]/

Did you base your work on next?

Best regards,
Krzysztof

#2 lore raw
Quoted 1 line · Krzysztof Kozlowski

Did you base your work on next?

no, -rc2.

Quoted 2 lines

Best regards,
Krzysztof

Sebastian

#3 lore raw
Quoted 4 lines · Sebastian Andrzej Siewior
Quoted 1 line · Krzysztof Kozlowski

Did you base your work on next?

no, -rc2.

Yeah, it missed the merge window...

Best regards,
Krzysztof

#4 lore raw
Quoted 1 line · Krzysztof Kozlowski

Yeah, it missed the merge window...

Could you please send it for -rc3?

Quoted 2 lines

Best regards,
Krzysztof

Sebastian