• YueHaibing's avatar
    ipmi: ipmb: Fix build error while CONFIG_I2C is set to m · 102308f5
    YueHaibing authored
    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: default avatarHulk Robot <hulkci@huawei.com>
    Fixes: 51bd6f29 ("Add support for IPMB driver")
    Signed-off-by: default avatarYueHaibing <yuehaibing@huawei.com>
    Message-Id: <20190612031825.24732-1-yuehaibing@huawei.com>
    Signed-off-by: default avatarCorey Minyard <cminyard@mvista.com>
    102308f5
Kconfig 4.6 KB