On Mon, Jan 11, 2016 at 09:13:31PM +0100, Janosch Frank wrote:
> Since all spi read and write functions were basically preparing the
> same data, moving the preparation into a function decreased line count
> a lot.
> 
> This also resolves the following problems:
> Zeroing the message ourselves is not needed, as spi_message_init()
> already does that for us.
> 
> The comment on struct spi_transfer states that setting rx or tx to
> NULL will result in sending zeroes or discarding read data. Therefore
> we don't have to allocate an empty buffer if we only do one way
> transfer.
> 
> Returning -ENOMEM on failed allocation would not have resulted in
> error catching but success in the callee. Thats because of the
> strange expected return values.
> 
> Signed-off-by: Janosch Frank <ker...@janosch-frank.de>
> ---
>  drivers/staging/wilc1000/linux_wlan_spi.c | 183 
> ++++++++----------------------

linux_wlan_spi.c has been deleted by:
523fc23f1179 ("staging: wilc1000: remove unused files")

regards
sudip
_______________________________________________
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

Reply via email to