* [PATCH v2 03/11] spi: spi-ep93xx: remove bits_per_word() helper
@ 2013-07-02 17:07 H Hartley Sweeten
2013-07-03 18:02 ` Mika Westerberg
2013-07-03 18:21 ` Mark Brown
0 siblings, 2 replies; 3+ messages in thread
From: H Hartley Sweeten @ 2013-07-02 17:07 UTC (permalink / raw)
To: Linux Kernel
Cc: Ryan Mallon, mika.westerberg-X3B1VOXEql0,
hsweeten-3FF4nKcrg1dE2c76skzGb0EOCMrvLtNR,
broonie-DgEjT+Ai2ygdnm+yROfE0A,
grant.likely-QSEj5FYQhm4dnm+yROfE0A,
spi-devel-general-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Check t->bits_per_word directly and remove the inline helper function.
Signed-off-by: H Hartley Sweeten <hsweeten-3FF4nKcrg1dE2c76skzGb0EOCMrvLtNR@public.gmane.org>
Cc: Ryan Mallon <rmallon-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: Mika Westerberg <mika.westerberg-X3B1VOXEql0@public.gmane.org>
Cc: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Cc: Grant Likely <grant.likely-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
drivers/spi/spi-ep93xx.c | 14 +++-----------
1 file changed, 3 insertions(+), 11 deletions(-)
diff --git a/drivers/spi/spi-ep93xx.c b/drivers/spi/spi-ep93xx.c
index d7eccfc..d5e6420 100644
--- a/drivers/spi/spi-ep93xx.c
+++ b/drivers/spi/spi-ep93xx.c
@@ -429,17 +429,9 @@ static void ep93xx_spi_chip_setup(const struct ep93xx_spi *espi,
ep93xx_spi_write_u16(espi, SSPCR0, cr0);
}
-static inline int bits_per_word(const struct ep93xx_spi *espi)
-{
- struct spi_message *msg = espi->current_msg;
- struct spi_transfer *t = msg->state;
-
- return t->bits_per_word;
-}
-
static void ep93xx_do_write(struct ep93xx_spi *espi, struct spi_transfer *t)
{
- if (bits_per_word(espi) > 8) {
+ if (t->bits_per_word > 8) {
u16 tx_val = 0;
if (t->tx_buf)
@@ -458,7 +450,7 @@ static void ep93xx_do_write(struct ep93xx_spi *espi, struct spi_transfer *t)
static void ep93xx_do_read(struct ep93xx_spi *espi, struct spi_transfer *t)
{
- if (bits_per_word(espi) > 8) {
+ if (t->bits_per_word > 8) {
u16 rx_val;
rx_val = ep93xx_spi_read_u16(espi, SSPDR);
@@ -544,7 +536,7 @@ ep93xx_spi_dma_prepare(struct ep93xx_spi *espi, enum dma_transfer_direction dir)
size_t len = t->len;
int i, ret, nents;
- if (bits_per_word(espi) > 8)
+ if (t->bits_per_word > 8)
buswidth = DMA_SLAVE_BUSWIDTH_2_BYTES;
else
buswidth = DMA_SLAVE_BUSWIDTH_1_BYTE;
--
1.8.1.4
------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:
Build for Windows Store.
http://p.sf.net/sfu/windows-dev2dev
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v2 03/11] spi: spi-ep93xx: remove bits_per_word() helper
2013-07-02 17:07 [PATCH v2 03/11] spi: spi-ep93xx: remove bits_per_word() helper H Hartley Sweeten
@ 2013-07-03 18:02 ` Mika Westerberg
2013-07-03 18:21 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mika Westerberg @ 2013-07-03 18:02 UTC (permalink / raw)
To: H Hartley Sweeten
Cc: Linux Kernel, spi-devel-general, Ryan Mallon, broonie,
grant.likely, hsweeten
On Tue, Jul 02, 2013 at 10:07:01AM -0700, H Hartley Sweeten wrote:
> Check t->bits_per_word directly and remove the inline helper function.
>
> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
> Cc: Ryan Mallon <rmallon@gmail.com>
> Cc: Mika Westerberg <mika.westerberg@iki.fi>
I wonder why the helper was there in the first place.
Acked-by: Mika Westerberg <mika.westerberg@iki.fi>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v2 03/11] spi: spi-ep93xx: remove bits_per_word() helper
2013-07-02 17:07 [PATCH v2 03/11] spi: spi-ep93xx: remove bits_per_word() helper H Hartley Sweeten
2013-07-03 18:02 ` Mika Westerberg
@ 2013-07-03 18:21 ` Mark Brown
1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2013-07-03 18:21 UTC (permalink / raw)
To: H Hartley Sweeten
Cc: Linux Kernel, spi-devel-general, Ryan Mallon, mika.westerberg,
grant.likely, hsweeten
[-- Attachment #1: Type: text/plain, Size: 158 bytes --]
On Tue, Jul 02, 2013 at 10:07:01AM -0700, H Hartley Sweeten wrote:
> Check t->bits_per_word directly and remove the inline helper function.
Applied, thanks.
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2013-07-03 18:21 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-07-02 17:07 [PATCH v2 03/11] spi: spi-ep93xx: remove bits_per_word() helper H Hartley Sweeten
2013-07-03 18:02 ` Mika Westerberg
2013-07-03 18:21 ` Mark Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).