Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

media: spi: gs1662: Use new structure for SPI transfer delays

In a recent change to the SPI subsystem [1], a new `delay` struct was added
to replace the `delay_usecs`. This change replaces the current
`delay_usecs` with `delay` for this driver.

The `spi_transfer_delay_exec()` function [in the SPI framework] makes sure
that both `delay_usecs` & `delay` are used (in this order to preserve
backwards compatibility).

[1] commit bebcfd272df6 ("spi: introduce `delay` field for
`spi_transfer` + spi_transfer_delay_exec()")

Signed-off-by: Sergiu Cuciurean <sergiu.cuciurean@analog.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>

authored by

Sergiu Cuciurean and committed by
Mauro Carvalho Chehab
204c7b3c aead0ffb

+16 -4
+16 -4
drivers/media/spi/gs1662.c
··· 147 147 { 148 148 .tx_buf = &buf_addr, 149 149 .len = 2, 150 - .delay_usecs = 1, 150 + .delay = { 151 + .value = 1, 152 + .unit = SPI_DELAY_UNIT_USECS 153 + }, 151 154 }, { 152 155 .rx_buf = &buf_value, 153 156 .len = 2, 154 - .delay_usecs = 1, 157 + .delay = { 158 + .value = 1, 159 + .unit = SPI_DELAY_UNIT_USECS 160 + }, 155 161 }, 156 162 }; 157 163 ··· 181 175 { 182 176 .tx_buf = &buf_addr, 183 177 .len = 2, 184 - .delay_usecs = 1, 178 + .delay = { 179 + .value = 1, 180 + .unit = SPI_DELAY_UNIT_USECS 181 + }, 185 182 }, { 186 183 .tx_buf = &buf_value, 187 184 .len = 2, 188 - .delay_usecs = 1, 185 + .delay = { 186 + .value = 1, 187 + .unit = SPI_DELAY_UNIT_USECS 188 + }, 189 189 }, 190 190 }; 191 191