mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
synced 2025-01-08 15:04:45 +00:00
spi: octeon: Use list_is_last() instead of open-coded
Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Mark Brown <broonie@linaro.org>
This commit is contained in:
parent
38dbfb59d1
commit
0a4e210e99
@ -179,7 +179,8 @@ static int octeon_spi_transfer_one_message(struct spi_master *master,
|
||||
}
|
||||
|
||||
list_for_each_entry(xfer, &msg->transfers, transfer_list) {
|
||||
bool last_xfer = &xfer->transfer_list == msg->transfers.prev;
|
||||
bool last_xfer = list_is_last(&xfer->transfer_list,
|
||||
&msg->transfers);
|
||||
int r = octeon_spi_do_transfer(p, msg, xfer, last_xfer);
|
||||
if (r < 0) {
|
||||
status = r;
|
||||
|
Loading…
Reference in New Issue
Block a user