Skip to content

Commit

Permalink
bq27x00: Fix I2C dependency in KConfig
Browse files Browse the repository at this point in the history
This patch fixes build failure(randconfig) of next-20130501. When config
I2C as m, BATTERY_BQ27x00 as y, here comes the failure. The driver depends
on I2C only if I2C is not disabled, as Lars commented. Last version of
this patch make the driver depend on I2C unconditionally.

Failure message:
drivers/built-in.o: In function `bq27x00_read_i2c':
bq27x00_battery.c:(.text+0x1082a7): undefined reference to `i2c_transfer'
drivers/built-in.o: In function `bq27x00_battery_init':
bq27x00_battery.c:(.init.text+0x6085): undefined reference to `i2c_register_driver'
bq27x00_battery.c:(.init.text+0x60c7): undefined reference to `i2c_del_driver'
drivers/built-in.o: In function `bq27x00_battery_exit':
bq27x00_battery.c:(.exit.text+0xbf0): undefined reference to `i2c_del_driver'
make: *** [vmlinux] Error 1

Signed-off-by: Xiong Zhou <jencce.kernel@gmail.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Anton Vorontsov <anton@enomsg.org>
  • Loading branch information
Xiong Zhou authored and Anton Vorontsov committed May 10, 2013
1 parent 237a1b0 commit a2d0dbb
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/power/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ config BATTERY_SBS

config BATTERY_BQ27x00
tristate "BQ27x00 battery driver"
depends on I2C || I2C=n
help
Say Y here to enable support for batteries with BQ27x00 (I2C/HDQ) chips.

Expand Down

0 comments on commit a2d0dbb

Please sign in to comment.