]> git.baikalelectronics.ru Git - kernel.git/commit
of: unittest: fix I2C dependency
authorArnd Bergmann <arnd@arndb.de>
Wed, 4 Mar 2015 19:49:47 +0000 (20:49 +0100)
committerRob Herring <robh@kernel.org>
Tue, 10 Mar 2015 15:34:33 +0000 (10:34 -0500)
commit518b9cd23ff8d6891dc563b0e47732746c11831c
tree42d52907bfff3227cca205e443bc495dacfe9e88
parentd5331e7582a0756c7df4140408dd9eb326445531
of: unittest: fix I2C dependency

The unittest fails to link if I2C or I2C_MUX is a loadable module:

  drivers/built-in.o: In function `selftest_i2c_mux_remove':
  unittest.c:(.text+0xb0ce4): undefined reference to `i2c_del_mux_adapter'

This changes the newly added IS_ENABLED() checks to use IS_BUILTIN()
instead, which evaluates to false if the other driver is a module.

Reported-by: Chen Gang <gang.chen.5i5j@gmail.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Fixes: c114b6aab204c ("of: unitest: Add I2C overlay unit tests.")
Signed-off-by: Rob Herring <robh@kernel.org>
drivers/of/unittest.c