Commit 55a47532 authored by Alexandru Ardelean's avatar Alexandru Ardelean Committed by Mark Brown

spi: fsl-espi: remove usage of 'delay_usecs' field

The 'delay_usecs' field is being removed from the spi_transfer struct.
This change removes it from the SPI FSL ESPI driver.
Signed-off-by: default avatarAlexandru Ardelean <aardelean@deviqon.com>
Link: https://lore.kernel.org/r/20210308145502.1075689-9-aardelean@deviqon.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent a886010c
...@@ -435,8 +435,7 @@ static int fsl_espi_trans(struct spi_message *m, struct spi_transfer *trans) ...@@ -435,8 +435,7 @@ static int fsl_espi_trans(struct spi_message *m, struct spi_transfer *trans)
static int fsl_espi_do_one_msg(struct spi_master *master, static int fsl_espi_do_one_msg(struct spi_master *master,
struct spi_message *m) struct spi_message *m)
{ {
unsigned int delay_usecs = 0, rx_nbits = 0; unsigned int rx_nbits = 0, delay_nsecs = 0;
unsigned int delay_nsecs = 0, delay_nsecs1 = 0;
struct spi_transfer *t, trans = {}; struct spi_transfer *t, trans = {};
int ret; int ret;
...@@ -445,16 +444,10 @@ static int fsl_espi_do_one_msg(struct spi_master *master, ...@@ -445,16 +444,10 @@ static int fsl_espi_do_one_msg(struct spi_master *master,
goto out; goto out;
list_for_each_entry(t, &m->transfers, transfer_list) { list_for_each_entry(t, &m->transfers, transfer_list) {
if (t->delay_usecs) { unsigned int delay = spi_delay_to_ns(&t->delay, t);
if (t->delay_usecs > delay_usecs) {
delay_usecs = t->delay_usecs; if (delay > delay_nsecs)
delay_nsecs = delay_usecs * 1000; delay_nsecs = delay;
}
} else {
delay_nsecs1 = spi_delay_to_ns(&t->delay, t);
if (delay_nsecs1 > delay_nsecs)
delay_nsecs = delay_nsecs1;
}
if (t->rx_nbits > rx_nbits) if (t->rx_nbits > rx_nbits)
rx_nbits = t->rx_nbits; rx_nbits = t->rx_nbits;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment