All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] spi: coldfire-qspi: Simplify the code to set register bits for transfer speed
@ 2014-03-20 14:59 Axel Lin
  2014-03-25 18:05 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2014-03-20 14:59 UTC (permalink / raw)
  To: Mark Brown; +Cc: Steven King, linux-spi-u79uwXL29TY76Z2rM5mHXA

spi core will use spi->max_speed_hz as transfer speed if the transfer speed was
not set. So we don't need to test t->speed_hz in mcfqspi_transfer_one().

Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
---
 drivers/spi/spi-coldfire-qspi.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/drivers/spi/spi-coldfire-qspi.c b/drivers/spi/spi-coldfire-qspi.c
index e36c7cb..e2fa628 100644
--- a/drivers/spi/spi-coldfire-qspi.c
+++ b/drivers/spi/spi-coldfire-qspi.c
@@ -321,10 +321,7 @@ static int mcfqspi_transfer_one(struct spi_master *master,
 		qmr |= MCFQSPI_QMR_CPHA;
 	if (spi->mode & SPI_CPOL)
 		qmr |= MCFQSPI_QMR_CPOL;
-	if (t->speed_hz)
-		qmr |= mcfqspi_qmr_baud(t->speed_hz);
-	else
-		qmr |= mcfqspi_qmr_baud(spi->max_speed_hz);
+	qmr |= mcfqspi_qmr_baud(t->speed_hz);
 	mcfqspi_wr_qmr(mcfqspi, qmr);
 
 	mcfqspi_wr_qir(mcfqspi, MCFQSPI_QIR_SPIFE);
-- 
1.8.3.2



--
To unsubscribe from this list: send the line "unsubscribe linux-spi" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] spi: coldfire-qspi: Simplify the code to set register bits for transfer speed
  2014-03-20 14:59 [PATCH] spi: coldfire-qspi: Simplify the code to set register bits for transfer speed Axel Lin
@ 2014-03-25 18:05 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2014-03-25 18:05 UTC (permalink / raw)
  To: Axel Lin; +Cc: Steven King, linux-spi-u79uwXL29TY76Z2rM5mHXA

[-- Attachment #1: Type: text/plain, Size: 233 bytes --]

On Thu, Mar 20, 2014 at 10:59:06PM +0800, Axel Lin wrote:
> spi core will use spi->max_speed_hz as transfer speed if the transfer speed was
> not set. So we don't need to test t->speed_hz in mcfqspi_transfer_one().

Applied, thanks.

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-25 18:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-03-20 14:59 [PATCH] spi: coldfire-qspi: Simplify the code to set register bits for transfer speed Axel Lin
2014-03-25 18:05 ` Mark Brown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.