Platform: OLPC: Fix build error without CONFIG_SPI

Fix gcc build error while CONFIG_SPI is not set

drivers/platform/olpc/olpc-xo175-ec.o: In function `olpc_xo175_ec_remove':
olpc-xo175-ec.c:(.text+0x190): undefined reference to `spi_slave_abort'
drivers/platform/olpc/olpc-xo175-ec.o: In function `olpc_xo175_ec_send_command':
olpc-xo175-ec.c:(.text+0x374): undefined reference to `spi_async'
drivers/platform/olpc/olpc-xo175-ec.o: In function `olpc_xo175_ec_cmd':
olpc-xo175-ec.c:(.text+0x8a0): undefined reference to `spi_slave_abort'
drivers/platform/olpc/olpc-xo175-ec.o: In function `olpc_xo175_ec_spi_driver_init':
olpc-xo175-ec.c:(.init.text+0x14): undefined reference to `__spi_register_driver'

We should depends on CONFIG_SPI_SLAVE other than directly select it.

Reported-by: Hulk Robot <hulkci@huawei.com>
Fixes: 0c3d931b3a ("Platform: OLPC: Add XO-1.75 EC driver")
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
This commit is contained in:
YueHaibing 2019-05-28 17:28:05 +08:00 committed by Andy Shevchenko
parent ef071bab65
commit ad04ca76c6

View File

@ -5,7 +5,7 @@ config OLPC_EC
config OLPC_XO175_EC
tristate "OLPC XO 1.75 Embedded Controller"
depends on ARCH_MMP || COMPILE_TEST
select SPI_SLAVE
depends on SPI_SLAVE
select OLPC_EC
help
Include support for the OLPC XO Embedded Controller (EC). The EC