From: Jean-Christophe PLAGNIOL-VILLARD Date: Fri, 6 Feb 2009 22:28:55 +0100 Subject: [U-Boot] [PATCH 1/9 v3] i.MX31: fix SPI driver for shorter than 32 bit transfers In-Reply-To: References: Message-ID: <20090206212855.GF24772@game.jcrosoft.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de + > + /* 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.