From mboxrd@z Thu Jan 1 00:00:00 1970 From: martinwguy@gmail.com (Martin Guy) Date: Fri, 9 Apr 2010 19:08:16 +0100 Subject: [PATCH v2 1/3] spi: implemented driver for Cirrus EP93xx SPI controller In-Reply-To: References: <9de3769ae253830fb0eebc98d299137c59c69b8c.1268930557.git.mika.westerberg@iki.fi> <56d259a01003250649ubf0e32ejc15e4f3b45ec43cd@mail.gmail.com> <20100325184316.GB20512@gw.healthdatacare.com> <20100406054418.GA27465@gw.healthdatacare.com> <20100406181839.GA2685@gw.healthdatacare.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Oops, I mean - unsigned n; /* Number of bytes to send to the TX FIFO */ + unsigned n; /* Number of words to send to the TX FIFO */ and - n = t->len - espi->tx; /* Total number of bytes waiting to be - * sent to the TX FIFO for this transfer */ + /* Number of words still to be sent to the TX FIFO */ + n = (t->len - espi->tx) / (bits_per_word(espi) > 8 ? 2 : 1); sorry about that. M