[U-Boot] [PATCH 1/9 v3] i.MX31: fix SPI driver for shorter than 32 bit transfers

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Fri Feb 6 22:28:55 CET 2009


 +
> +		/* Check if we're only transfering 8 or 16 bits */
> +		if (!i) {
> +			if (bitlen < 9)
> +				*(u8 *)din = data;
> +			else if (bitlen < 17)
> +				*(u16 *)din = data;
> +		}
> +	}
>  
>  	return 0;
>  }
> @@ -169,7 +176,8 @@ struct spi_slave *spi_setup_slave(unsigned int bus, unsigned int cs,
>  
>  void spi_free_slave(struct spi_slave *slave)
>  {
> -	free(slave);
> +	struct mxc_spi_slave *mxcs = to_mxc_spi_slave(slave);
> +	free(mxcs);
please add an empty line
>  }
Best Regards,
J.


More information about the U-Boot mailing list