summaryrefslogtreecommitdiffstats
path: root/include/linux/extcon.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/extcon.h')
-rw-r--r--include/linux/extcon.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/extcon.h b/include/linux/extcon.h
index 1b2c8b6809cc..7bf530f3f4f5 100644
--- a/include/linux/extcon.h
+++ b/include/linux/extcon.h
@@ -182,6 +182,12 @@ extern int extcon_register_notifier(struct extcon_dev *edev, unsigned int id,
struct notifier_block *nb);
extern int extcon_unregister_notifier(struct extcon_dev *edev, unsigned int id,
struct notifier_block *nb);
+extern int devm_extcon_register_notifier(struct device *dev,
+ struct extcon_dev *edev, unsigned int id,
+ struct notifier_block *nb);
+extern void devm_extcon_unregister_notifier(struct device *dev,
+ struct extcon_dev *edev, unsigned int id,
+ struct notifier_block *nb);
/*
* Following API get the extcon device from devicetree.
@@ -273,6 +279,17 @@ static inline int extcon_unregister_notifier(struct extcon_dev *edev,
return 0;
}
+static inline int devm_extcon_register_notifier(struct device *dev,
+ struct extcon_dev *edev, unsigned int id,
+ struct notifier_block *nb)
+{
+ return -ENOSYS;
+}
+
+static inline void devm_extcon_unregister_notifier(struct device *dev,
+ struct extcon_dev *edev, unsigned int id,
+ struct notifier_block *nb) { }
+
static inline struct extcon_dev *extcon_get_edev_by_phandle(struct device *dev,
int index)
{