diff mbox series

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

Message ID 20210312141051.blqkm2v2yx6psild@linutronix.de
State New
Headers show
Series extcon: Provide *extcon_*_notifier_all() stubs for !CONFIG_EXTCON | expand

Commit Message

Sebastian Andrzej Siewior March 12, 2021, 2:10 p.m. UTC
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")
Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
---
 include/linux/extcon.h | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

Comments

Sebastian Andrzej Siewior March 12, 2021, 2:53 p.m. UTC | #1
On 2021-03-12 15:45:48 [+0100], Krzysztof Kozlowski wrote:
> Did you base your work on next?

no, -rc2.

> Best regards,
> Krzysztof

Sebastian
Sebastian Andrzej Siewior March 12, 2021, 2:55 p.m. UTC | #2
On 2021-03-12 15:53:53 [+0100], Krzysztof Kozlowski wrote:
> Yeah, it missed the merge window...

Could you please send it for -rc3?

> Best regards,
> Krzysztof

Sebastian
diff mbox series

Patch

diff --git a/include/linux/extcon.h b/include/linux/extcon.h
index fd183fb9c20f7..8246307f9ed38 100644
--- a/include/linux/extcon.h
+++ b/include/linux/extcon.h
@@ -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);