linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: bfin5xx: Remove duplicate code to check spi->mode
@ 2014-02-03  2:51 Axel Lin
  2014-02-07  2:07 ` Zhang, Sonic
  2014-02-14 20:18 ` Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2014-02-03  2:51 UTC (permalink / raw)
  To: Mark Brown; +Cc: Sonic Zhang, Steven Miao, linux-spi-u79uwXL29TY76Z2rM5mHXA

This checking is already done in the implementation of spi_setup().

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

diff --git a/drivers/spi/spi-bfin5xx.c b/drivers/spi/spi-bfin5xx.c
index f0f195a..c6902d2 100644
--- a/drivers/spi/spi-bfin5xx.c
+++ b/drivers/spi/spi-bfin5xx.c
@@ -1030,10 +1030,6 @@ static int bfin_spi_setup(struct spi_device *spi)
 	}
 
 	/* translate common spi framework into our register */
-	if (spi->mode & ~(SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST)) {
-		dev_err(&spi->dev, "unsupported spi modes detected\n");
-		goto error;
-	}
 	if (spi->mode & SPI_CPOL)
 		chip->ctl_reg |= BIT_CTL_CPOL;
 	if (spi->mode & SPI_CPHA)
-- 
1.8.1.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] 3+ messages in thread

* RE: [PATCH] spi: bfin5xx: Remove duplicate code to check spi->mode
  2014-02-03  2:51 [PATCH] spi: bfin5xx: Remove duplicate code to check spi->mode Axel Lin
@ 2014-02-07  2:07 ` Zhang, Sonic
  2014-02-14 20:18 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Zhang, Sonic @ 2014-02-07  2:07 UTC (permalink / raw)
  To: Axel Lin, Mark Brown
  Cc: Steven Miao, linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	Jiang, Scott

CC Scott Jiang


>-----Original Message-----
>From: Axel Lin [mailto:axel.lin@ingics.com]
>Sent: Monday, February 03, 2014 10:52 AM
>To: Mark Brown
>Cc: Zhang, Sonic; Steven Miao; linux-spi@vger.kernel.org
>Subject: [PATCH] spi: bfin5xx: Remove duplicate code to check spi->mode
>
>This checking is already done in the implementation of spi_setup().
>
>Signed-off-by: Axel Lin <axel.lin@ingics.com>
>---
> drivers/spi/spi-bfin5xx.c | 4 ----
> 1 file changed, 4 deletions(-)
>
>diff --git a/drivers/spi/spi-bfin5xx.c b/drivers/spi/spi-bfin5xx.c index f0f195a..c6902d2
>100644
>--- a/drivers/spi/spi-bfin5xx.c
>+++ b/drivers/spi/spi-bfin5xx.c
>@@ -1030,10 +1030,6 @@ static int bfin_spi_setup(struct spi_device *spi)
>       }
>
>       /* translate common spi framework into our register */
>-      if (spi->mode & ~(SPI_CPOL | SPI_CPHA | SPI_LSB_FIRST)) {
>-              dev_err(&spi->dev, "unsupported spi modes detected\n");
>-              goto error;
>-      }
>       if (spi->mode & SPI_CPOL)
>               chip->ctl_reg |= BIT_CTL_CPOL;
>       if (spi->mode & SPI_CPHA)
>--
>1.8.1.2
>
>
>


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

* Re: [PATCH] spi: bfin5xx: Remove duplicate code to check spi->mode
  2014-02-03  2:51 [PATCH] spi: bfin5xx: Remove duplicate code to check spi->mode Axel Lin
  2014-02-07  2:07 ` Zhang, Sonic
@ 2014-02-14 20:18 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2014-02-14 20:18 UTC (permalink / raw)
  To: Axel Lin; +Cc: Sonic Zhang, Steven Miao, linux-spi-u79uwXL29TY76Z2rM5mHXA

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

On Mon, Feb 03, 2014 at 10:51:30AM +0800, Axel Lin wrote:
> This checking is already done in the implementation of spi_setup().

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:[~2014-02-14 20:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-03  2:51 [PATCH] spi: bfin5xx: Remove duplicate code to check spi->mode Axel Lin
2014-02-07  2:07 ` Zhang, Sonic
2014-02-14 20:18 ` 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).