On Fri, Feb 17, 2017 at 11:38:19AM +0100, Frode Isaksen wrote: > +static inline bool __davinci_spi_can_dma(struct spi_device *spi) > +{ > + struct davinci_spi_config *spicfg = spi->controller_data; > + > + return spicfg ? spicfg->io_type == SPI_IO_TYPE_DMA : false; > +} > + > +static bool davinci_spi_can_dma(struct spi_master *master, > + struct spi_device *spi, > + struct spi_transfer *xfer) > +{ > + return __davinci_spi_can_dma(spi); > +} Why the wrapper function? __davinci_spi_can_dma has exactly one user immediately below it. Also please write normal if statements, it really helps with legibility.
Attachment:
signature.asc
Description: PGP signature