Skip to content

Commit a51de0f

Browse files
krzksmb49
authored andcommitted
extcon: Add stubs for extcon_register_notifier_all() functions
BugLink: https://bugs.launchpad.net/bugs/1923869 [ Upstream commit c9570d4 ] 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: 815429b ("extcon: Add new extcon_register_notifier_all() to monitor all external connectors") Reported-by: kernel test robot <lkp@intel.com> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Sasha Levin <sashal@kernel.org> Signed-off-by: Kamal Mostafa <kamal@canonical.com> Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
1 parent 8e0d8b6 commit a51de0f

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

include/linux/extcon.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -271,6 +271,29 @@ static inline void devm_extcon_unregister_notifier(struct device *dev,
271271
struct extcon_dev *edev, unsigned int id,
272272
struct notifier_block *nb) { }
273273

274+
static inline int extcon_register_notifier_all(struct extcon_dev *edev,
275+
struct notifier_block *nb)
276+
{
277+
return 0;
278+
}
279+
280+
static inline int extcon_unregister_notifier_all(struct extcon_dev *edev,
281+
struct notifier_block *nb)
282+
{
283+
return 0;
284+
}
285+
286+
static inline int devm_extcon_register_notifier_all(struct device *dev,
287+
struct extcon_dev *edev,
288+
struct notifier_block *nb)
289+
{
290+
return 0;
291+
}
292+
293+
static inline void devm_extcon_unregister_notifier_all(struct device *dev,
294+
struct extcon_dev *edev,
295+
struct notifier_block *nb) { }
296+
274297
static inline struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name)
275298
{
276299
return ERR_PTR(-ENODEV);

0 commit comments

Comments
 (0)