linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: st-ssc4: Remove duplicate code to test unsupported mode bits
@ 2015-01-05 14:49 Axel Lin
  2015-01-14 19:17 ` Mark Brown
  2015-01-18 12:44 ` Lee Jones
  0 siblings, 2 replies; 3+ messages in thread
From: Axel Lin @ 2015-01-05 14:49 UTC (permalink / raw)
  To: Mark Brown; +Cc: Lee Jones, linux-spi

spi_setup() will test unsupported mode bits before calling spi->master->setup.
Thus remove duplicate code to test unsupported mode bits in spi_st_setup().

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

diff --git a/drivers/spi/spi-st-ssc4.c b/drivers/spi/spi-st-ssc4.c
index 8f8770a..2faeaa7 100644
--- a/drivers/spi/spi-st-ssc4.c
+++ b/drivers/spi/spi-st-ssc4.c
@@ -217,12 +217,6 @@ static int spi_st_setup(struct spi_device *spi)
 	int cs = spi->cs_gpio;
 	int ret;
 
-	if (spi->mode & ~MODEBITS) {
-		dev_err(&spi->dev, "unsupported mode bits 0x%x\n",
-			spi->mode & ~MODEBITS);
-		return -EINVAL;
-	}
-
 	if (!hz)  {
 		dev_err(&spi->dev, "max_speed_hz unspecified\n");
 		return -EINVAL;
-- 
1.9.1



--
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: st-ssc4: Remove duplicate code to test unsupported mode bits
  2015-01-05 14:49 [PATCH] spi: st-ssc4: Remove duplicate code to test unsupported mode bits Axel Lin
@ 2015-01-14 19:17 ` Mark Brown
  2015-01-18 12:44 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2015-01-14 19:17 UTC (permalink / raw)
  To: Axel Lin; +Cc: Lee Jones, linux-spi

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

On Mon, Jan 05, 2015 at 10:49:36PM +0800, Axel Lin wrote:
> spi_setup() will test unsupported mode bits before calling spi->master->setup.
> Thus remove duplicate code to test unsupported mode bits in spi_st_setup().

Applied, thanks.

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

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

* Re: [PATCH] spi: st-ssc4: Remove duplicate code to test unsupported mode bits
  2015-01-05 14:49 [PATCH] spi: st-ssc4: Remove duplicate code to test unsupported mode bits Axel Lin
  2015-01-14 19:17 ` Mark Brown
@ 2015-01-18 12:44 ` Lee Jones
  1 sibling, 0 replies; 3+ messages in thread
From: Lee Jones @ 2015-01-18 12:44 UTC (permalink / raw)
  To: Axel Lin; +Cc: Mark Brown, linux-spi

On Mon, 05 Jan 2015, Axel Lin wrote:

> spi_setup() will test unsupported mode bits before calling spi->master->setup.
> Thus remove duplicate code to test unsupported mode bits in spi_st_setup().
> 
> Signed-off-by: Axel Lin <axel.lin-8E1dMatC8ynQT0dZR+AlfA@public.gmane.org>
> ---
>  drivers/spi/spi-st-ssc4.c | 6 ------
>  1 file changed, 6 deletions(-)

FWIW: Acked-by: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

> diff --git a/drivers/spi/spi-st-ssc4.c b/drivers/spi/spi-st-ssc4.c
> index 8f8770a..2faeaa7 100644
> --- a/drivers/spi/spi-st-ssc4.c
> +++ b/drivers/spi/spi-st-ssc4.c
> @@ -217,12 +217,6 @@ static int spi_st_setup(struct spi_device *spi)
>  	int cs = spi->cs_gpio;
>  	int ret;
>  
> -	if (spi->mode & ~MODEBITS) {
> -		dev_err(&spi->dev, "unsupported mode bits 0x%x\n",
> -			spi->mode & ~MODEBITS);
> -		return -EINVAL;
> -	}
> -
>  	if (!hz)  {
>  		dev_err(&spi->dev, "max_speed_hz unspecified\n");
>  		return -EINVAL;

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
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	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2015-01-18 12:44 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-05 14:49 [PATCH] spi: st-ssc4: Remove duplicate code to test unsupported mode bits Axel Lin
2015-01-14 19:17 ` Mark Brown
2015-01-18 12:44 ` Lee Jones

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).