mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-26 02:39:48 +00:00
extcon: Add stubs for extcon_register_notifier_all() functions
[ Upstream commitc9570d4a5e
] 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:815429b39d
("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>
This commit is contained in:
parent
0fe56e294c
commit
023d13952e
1 changed files with 23 additions and 0 deletions
|
@ -271,6 +271,29 @@ static inline void devm_extcon_unregister_notifier(struct device *dev,
|
||||||
struct extcon_dev *edev, unsigned int id,
|
struct extcon_dev *edev, unsigned int id,
|
||||||
struct notifier_block *nb) { }
|
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)
|
static inline struct extcon_dev *extcon_get_extcon_dev(const char *extcon_name)
|
||||||
{
|
{
|
||||||
return ERR_PTR(-ENODEV);
|
return ERR_PTR(-ENODEV);
|
||||||
|
|
Loading…
Reference in a new issue