Commit c9570d4a authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Chanwoo Choi
Browse files

extcon: Add stubs for extcon_register_notifier_all() functions



Add stubs for extcon_register_notifier_all() function for !CONFIG_EXTCON
case.  This is useful for compile testing and for drivers which use
EXTCON but do not require it (therefore do not depend on CONFIG_EXTCON).

Fixes: 815429b3 ("extcon: Add new extcon_register_notifier_all() to monitor all external connectors")
Reported-by: default avatarkernel test robot <lkp@intel.com>
Signed-off-by: default avatarKrzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: default avatarChanwoo Choi <cw00.choi@samsung.com>
parent 1e28eed1
Loading
Loading
Loading
Loading
+23 −0
Original line number Diff line number Diff line
@@ -271,6 +271,29 @@ static inline void devm_extcon_unregister_notifier(struct device *dev,
				struct extcon_dev *edev, unsigned int id,
				struct notifier_block *nb) { }

static inline int extcon_register_notifier_all(struct extcon_dev *edev,
					       struct notifier_block *nb)
{
	return 0;
}

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 0;
}

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_get_extcon_dev(const char *extcon_name)
{
	return ERR_PTR(-ENODEV);