linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Chanwoo Choi <cw00.choi@samsung.com>
To: gregkh@linuxfoundation.org
Cc: cw00.choi@samsung.com, chanwoo@kernel.org,
	myungjoo.ham@samsung.com, linux-kernel@vger.kernel.org,
	Krzysztof Kozlowski <krzk@kernel.org>
Subject: [PATCH 1/3] extcon: Add stubs for extcon_register_notifier_all() functions
Date: Mon, 15 Feb 2021 19:06:08 +0900	[thread overview]
Message-ID: <20210215100610.19911-2-cw00.choi@samsung.com> (raw)
In-Reply-To: <20210215100610.19911-1-cw00.choi@samsung.com>

From: Krzysztof Kozlowski <krzk@kernel.org>

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>
---
 include/linux/extcon.h | 23 +++++++++++++++++++++++
 1 file changed, 23 insertions(+)

diff --git a/include/linux/extcon.h b/include/linux/extcon.h
index fd183fb9c20f..0c19010da77f 100644
--- a/include/linux/extcon.h
+++ b/include/linux/extcon.h
@@ -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);
-- 
2.17.1


  parent reply	other threads:[~2021-02-15  9:51 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20210215094951epcas1p1f9ab27ece5ee0deaf64ac1f593bdc976@epcas1p1.samsung.com>
2021-02-15 10:06 ` [PATCH 0/3] extcon: Add missing function defintion and update extcon driver Chanwoo Choi
     [not found]   ` <CGME20210215094951epcas1p1dd89e994519ae901dcbc743d0a9ae669@epcas1p1.samsung.com>
2021-02-15 10:06     ` Chanwoo Choi [this message]
     [not found]   ` <CGME20210215094951epcas1p154078de1f5752fdcbb080056771c0c66@epcas1p1.samsung.com>
2021-02-15 10:06     ` [PATCH 2/3] extcon: max8997: Add CHGINS and CHGRM interrupt handling Chanwoo Choi
     [not found]   ` <CGME20210215094951epcas1p3a7532c112193cbc9c2f3aa37a30ece33@epcas1p3.samsung.com>
2021-02-15 10:06     ` [PATCH 3/3] extcon: sm5502: Detect OTG when USB_ID is connected to ground Chanwoo Choi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210215100610.19911-2-cw00.choi@samsung.com \
    --to=cw00.choi@samsung.com \
    --cc=chanwoo@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=myungjoo.ham@samsung.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).