From: Arnd Bergmann <arnd@arndb.de>
To: Sebastian Reichel <sre@kernel.org>, linux-pm@vger.kernel.org
Cc: Xiong Zhou <jencce.kernel@gmail.com>,
Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>,
linux-kernel@vger.kernel.org, "Andrew F. Davis" <afd@ti.com>,
linux-i2c@vger.kernel.org, Pali Rohar <pali.rohar@gmail.com>,
David Woodhouse <dwmw2@infradead.org>,
linux-arm-kernel@lists.infradead.org
Subject: [PATCH] power: bq27xxx_battery: Revert "Remove unneeded dependency in Kconfig"
Date: Mon, 09 Nov 2015 14:50:47 +0100 [thread overview]
Message-ID: <3819790.E2ziFviWmU@wuerfel> (raw)
The dependency was clearly needed, without it it is possible to
build the core i2c driver as a loadable module and the bq27xxx
driver built-in, which results in link errors:
drivers/built-in.o: In function `bq27xxx_battery_i2c_read':
binder.c:(.text+0x360bf0): undefined reference to `i2c_transfer'
binder.c:(.text+0x360c10): undefined reference to `i2c_transfer'
drivers/built-in.o: In function `bq27xxx_battery_init':
binder.c:(.init.text+0xe668): undefined reference to `i2c_register_driver'
drivers/built-in.o: In function `bq27xxx_battery_exit':
binder.c:(.exit.text+0x1a0c): undefined reference to `i2c_del_driver'
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: 6bd03ce3c12a ("power: bq27xxx_battery: Remove unneeded dependency in Kconfig")
---
The bug was originally found and fixed by Xiong Zhou, but Andrew Davis
broke it again by reverting the fix.
I found it today on my ARM randconfig builds.
diff --git a/drivers/power/Kconfig b/drivers/power/Kconfig
index 237d7aa73e8c..9f53fb74ae6f 100644
--- a/drivers/power/Kconfig
+++ b/drivers/power/Kconfig
@@ -159,6 +159,7 @@ config BATTERY_SBS
config BATTERY_BQ27XXX
tristate "BQ27xxx battery driver"
+ depends on I2C || I2C=n
help
Say Y here to enable support for batteries with BQ27xxx (I2C/HDQ) chips.
next reply other threads:[~2015-11-09 13:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-09 13:50 Arnd Bergmann [this message]
2015-11-09 16:56 ` [PATCH] power: bq27xxx_battery: Revert "Remove unneeded dependency in Kconfig" Andrew F. Davis
2015-11-09 20:51 ` Arnd Bergmann
2015-11-09 21:23 ` Andrew F. Davis
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=3819790.E2ziFviWmU@wuerfel \
--to=arnd@arndb.de \
--cc=afd@ti.com \
--cc=dbaryshkov@gmail.com \
--cc=dwmw2@infradead.org \
--cc=jencce.kernel@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-i2c@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=pali.rohar@gmail.com \
--cc=sre@kernel.org \
/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).