]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
ipmi: ipmb: Fix build error while CONFIG_I2C is set to m
authorYueHaibing <yuehaibing@huawei.com>
Wed, 12 Jun 2019 03:18:25 +0000 (11:18 +0800)
committerCorey Minyard <cminyard@mvista.com>
Wed, 12 Jun 2019 12:18:59 +0000 (07:18 -0500)
If CONFIG_I2C is m and CONFIG_I2C_SLAVE is y,
building with CONFIG_IPMB_DEVICE_INTERFACE setting to
y will fail:

drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_remove':
ipmb_dev_int.c: undefined reference to `i2c_slave_unregister'
drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_write':
ipmb_dev_int.c: undefined reference to `i2c_smbus_write_block_data'
drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_probe':
ipmb_dev_int.c: undefined reference to `i2c_slave_register'
drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_driver_init':
ipmb_dev_int.c: undefined reference to `i2c_register_driver'
drivers/char/ipmi/ipmb_dev_int.o: In function `ipmb_driver_exit':
ipmb_dev_int.c: undefined reference to `i2c_del_driver'

Add I2C Kconfig dependency to fix this.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 51bd6f291583 ("Add support for IPMB driver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Message-Id: <20190612031825.24732-1-yuehaibing@huawei.com>
Signed-off-by: Corey Minyard <cminyard@mvista.com>
drivers/char/ipmi/Kconfig

index a9cfe4c05e6404d9727891a50b04220b2fa7d97d..e36db1b085d86a98973f3f1dc1cee72446004723 100644 (file)
@@ -134,6 +134,7 @@ config ASPEED_BT_IPMI_BMC
 
 config IPMB_DEVICE_INTERFACE
        tristate 'IPMB Interface handler'
+       depends on I2C
        depends on I2C_SLAVE
        help
          Provides a driver for a device (Satellite MC) to