From: Christoph Fritz <chf.fritz@googlemail.com>
To: Mark Brown <broonie@kernel.org>
Cc: Liam Girdwood <lgirdwood@gmail.com>,
kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
kernel test robot <lkp@intel.com>,
linux-kernel <linux-kernel@vger.kernel.org>
Subject: [PATCH] regulator: fan53880: Add support for COMPILE_TEST
Date: Tue, 07 Jul 2020 12:57:31 +0200 [thread overview]
Message-ID: <1c437154873ace65ff738a0ebca511308f1cecc1.camel@googlemail.com> (raw)
In-Reply-To: <20200707102042.GD4870@sirena.org.uk>
This patch adds support for COMPILE_TEST while fixing a warning when
no support for device tree is there.
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
---
drivers/regulator/Kconfig | 2 +-
drivers/regulator/fan53880.c | 2 ++
2 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig
index d47055db999d..1cc3c93a9621 100644
--- a/drivers/regulator/Kconfig
+++ b/drivers/regulator/Kconfig
@@ -338,7 +338,7 @@ config REGULATOR_FAN53555
config REGULATOR_FAN53880
tristate "Fairchild FAN53880 Regulator"
- depends on I2C
+ depends on I2C && (OF || COMPILE_TEST)
select REGMAP_I2C
help
This driver supports Fairchild (ON Semiconductor) FAN53880
diff --git a/drivers/regulator/fan53880.c b/drivers/regulator/fan53880.c
index 285acc705a55..c45baf581299 100644
--- a/drivers/regulator/fan53880.c
+++ b/drivers/regulator/fan53880.c
@@ -152,11 +152,13 @@ static int fan53880_i2c_probe(struct i2c_client *i2c,
return 0;
}
+#ifdef CONFIG_OF
static const struct of_device_id fan53880_dt_ids[] = {
{ .compatible = "onnn,fan53880", },
{}
};
MODULE_DEVICE_TABLE(of, fan53880_dt_ids);
+#endif
static const struct i2c_device_id fan53880_i2c_id[] = {
{ "fan53880", },
--
2.20.1
next prev parent reply other threads:[~2020-07-07 10:57 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <202007071433.Z3bmcgjU%lkp@intel.com>
2020-07-07 9:03 ` [PATCH] regulator: fan53880: fix Kconfig dependency Christoph Fritz
2020-07-07 10:20 ` Mark Brown
2020-07-07 10:57 ` Christoph Fritz [this message]
2020-07-07 14:17 ` [PATCH] regulator: fan53880: Add support for COMPILE_TEST Mark Brown
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=1c437154873ace65ff738a0ebca511308f1cecc1.camel@googlemail.com \
--to=chf.fritz@googlemail.com \
--cc=broonie@kernel.org \
--cc=clang-built-linux@googlegroups.com \
--cc=kbuild-all@lists.01.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=lkp@intel.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
all inboxes | Powered by JetHome®