Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: 815429b39d94 ("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>

authored by

Krzysztof Kozlowski and committed by
Chanwoo Choi
c9570d4a 1e28eed1

+23
+23
include/linux/extcon.h
··· 271 271 struct extcon_dev *edev, unsigned int id, 272 272 struct notifier_block *nb) { } 273 273 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 + 274 297 static inline struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name) 275 298 { 276 299 return ERR_PTR(-ENODEV);