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
1 changed files with 2 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue