Re: [PATCH v2 1/4] spi: Add 'last' flag to spi_transfer structure
From: Mark Brown
Date: Wed Nov 19 2014 - 04:35:36 EST
On Tue, Nov 18, 2014 at 11:55:46PM +0100, Beniamino Galvani wrote:
> Would it be better to introduce something like:
> static inline bool
> spi_transfer_is_last(struct spi_master *master, struct spi_transfer *xfer)
> {
> return list_is_last(&xfer->transfer_list, &master->cur_msg->transfers);
> }
> or open code it in the driver?
Adding the helper function seems better, it means we can change the
implementation later.
Attachment:
signature.asc
Description: Digital signature