summaryrefslogtreecommitdiff
path: root/src/soc/nvidia/tegra124/spi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/soc/nvidia/tegra124/spi.c')
-rw-r--r--src/soc/nvidia/tegra124/spi.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/soc/nvidia/tegra124/spi.c b/src/soc/nvidia/tegra124/spi.c
index 2ad4aa1f85..0cb48657d6 100644
--- a/src/soc/nvidia/tegra124/spi.c
+++ b/src/soc/nvidia/tegra124/spi.c
@@ -798,11 +798,14 @@ int spi_xfer(const struct spi_slave *slave, const void *dout,
return ret;
}
-struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs)
+int spi_setup_slave(unsigned int bus, unsigned int cs, struct spi_slave *slave)
{
struct tegra_spi_channel *channel = to_tegra_spi(bus);
if (!channel)
- return NULL;
+ return -1;
- return &channel->slave;
+ slave->bus = channel->slave.bus;
+ slave->cs = channel->slave.cs;
+
+ return 0;
}