]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
platform/chrome: cros_ec_spi: Wait for USECS, not NSECS
authorBenson Leung <bleung@chromium.org>
Tue, 7 Apr 2020 21:36:06 +0000 (14:36 -0700)
committerBenson Leung <bleung@chromium.org>
Tue, 7 Apr 2020 21:42:08 +0000 (14:42 -0700)
The use of `delay_usecs` in terminate_request() was replaced with the new
`delay` struct used by the SPI subsystem, however the unit was
set to SPI_DELAY_UNIT_NSECS instead of SPI_DELAY_UNIT_USECS. This fixes that.

Fixes: 7d3ca507fda9 ("platform/chrome: cros_ec_spi: Use new structure for SPI transfer delays")
Signed-off-by: Benson Leung <bleung@chromium.org>
drivers/platform/chrome/cros_ec_spi.c

index 665ab154bb4fbccf60d76e10e6544071d5fb11c1..debea5c4c82936667c9c35ff5a62f7a099427b53 100644 (file)
@@ -128,7 +128,7 @@ static int terminate_request(struct cros_ec_device *ec_dev)
        spi_message_init(&msg);
        memset(&trans, 0, sizeof(trans));
        trans.delay.value = ec_spi->end_of_msg_delay;
-       trans.delay.unit = SPI_DELAY_UNIT_NSECS;
+       trans.delay.unit = SPI_DELAY_UNIT_USECS;
        spi_message_add_tail(&trans, &msg);
 
        ret = spi_sync_locked(ec_spi->spi, &msg);