linux-spi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: atmel: print version only after successful registration
@ 2017-05-30  5:33 Baruch Siach
       [not found] ` <0ddb655ce326344aa32334e343ed4f0ba2996f72.1496122410.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
  0 siblings, 1 reply; 3+ messages in thread
From: Baruch Siach @ 2017-05-30  5:33 UTC (permalink / raw)
  To: Nicolas Ferre, Mark Brown; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA, Baruch Siach

Don't print the version at the beginning of atmel_spi_probe(). This avoids
spamming the log whenever a deferred probe runs.

Signed-off-by: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
---
 drivers/spi/spi-atmel.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index 1eb83c9613d5..4e5e51fe6f73 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -1422,7 +1422,6 @@ static void atmel_get_caps(struct atmel_spi *as)
 	unsigned int version;
 
 	version = atmel_get_version(as);
-	dev_info(&as->pdev->dev, "version: 0x%x\n", version);
 
 	as->caps.is_spi2 = version > 0x121;
 	as->caps.has_wdrbt = version >= 0x210;
@@ -1609,8 +1608,9 @@ static int atmel_spi_probe(struct platform_device *pdev)
 		goto out_free_dma;
 
 	/* go! */
-	dev_info(&pdev->dev, "Atmel SPI Controller at 0x%08lx (irq %d)\n",
-			(unsigned long)regs->start, irq);
+	dev_info(&pdev->dev, "Atmel SPI Controller version 0x%x at 0x%08lx (irq %d)\n",
+			atmel_get_version(as), (unsigned long)regs->start,
+			irq);
 
 	return 0;
 
-- 
2.11.0

--
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: atmel: print version only after successful registration
       [not found] ` <0ddb655ce326344aa32334e343ed4f0ba2996f72.1496122410.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
@ 2017-05-30  7:58   ` Nicolas Ferre
  2017-06-06 19:07   ` Applied "spi: atmel: print version only after successful registration" to the spi tree Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Nicolas Ferre @ 2017-05-30  7:58 UTC (permalink / raw)
  To: Baruch Siach, Mark Brown; +Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA

Le 30/05/2017 à 07:33, Baruch Siach a écrit :
> Don't print the version at the beginning of atmel_spi_probe(). This avoids
> spamming the log whenever a deferred probe runs.
> 
> Signed-off-by: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>

Acked-by: Nicolas Ferre <nicolas.ferre-UWL1GkI3JZL3oGB3hsPCZA@public.gmane.org>

Thanks!

> ---
>  drivers/spi/spi-atmel.c | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
> index 1eb83c9613d5..4e5e51fe6f73 100644
> --- a/drivers/spi/spi-atmel.c
> +++ b/drivers/spi/spi-atmel.c
> @@ -1422,7 +1422,6 @@ static void atmel_get_caps(struct atmel_spi *as)
>  	unsigned int version;
>  
>  	version = atmel_get_version(as);
> -	dev_info(&as->pdev->dev, "version: 0x%x\n", version);
>  
>  	as->caps.is_spi2 = version > 0x121;
>  	as->caps.has_wdrbt = version >= 0x210;
> @@ -1609,8 +1608,9 @@ static int atmel_spi_probe(struct platform_device *pdev)
>  		goto out_free_dma;
>  
>  	/* go! */
> -	dev_info(&pdev->dev, "Atmel SPI Controller at 0x%08lx (irq %d)\n",
> -			(unsigned long)regs->start, irq);
> +	dev_info(&pdev->dev, "Atmel SPI Controller version 0x%x at 0x%08lx (irq %d)\n",
> +			atmel_get_version(as), (unsigned long)regs->start,
> +			irq);
>  
>  	return 0;
>  
> 


-- 
Nicolas Ferre
--
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

* Applied "spi: atmel: print version only after successful registration" to the spi tree
       [not found] ` <0ddb655ce326344aa32334e343ed4f0ba2996f72.1496122410.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
  2017-05-30  7:58   ` Nicolas Ferre
@ 2017-06-06 19:07   ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2017-06-06 19:07 UTC (permalink / raw)
  To: Baruch Siach
  Cc: Nicolas Ferre, Mark Brown, Nicolas Ferre, Mark Brown,
	linux-spi-u79uwXL29TY76Z2rM5mHXA,
	linux-spi-u79uwXL29TY76Z2rM5mHXA

The patch

   spi: atmel: print version only after successful registration

has been applied to the spi tree at

   git://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

>From 6aba9c65649e5ef137bce7a958c0749f13af88a1 Mon Sep 17 00:00:00 2001
From: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
Date: Tue, 30 May 2017 08:33:30 +0300
Subject: [PATCH] spi: atmel: print version only after successful registration

Don't print the version at the beginning of atmel_spi_probe(). This avoids
spamming the log whenever a deferred probe runs.

Signed-off-by: Baruch Siach <baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
Acked-by: Nicolas Ferre <nicolas.ferre-UWL1GkI3JZL3oGB3hsPCZA@public.gmane.org>
Signed-off-by: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
---
 drivers/spi/spi-atmel.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/spi/spi-atmel.c b/drivers/spi/spi-atmel.c
index 1eb83c9613d5..4e5e51fe6f73 100644
--- a/drivers/spi/spi-atmel.c
+++ b/drivers/spi/spi-atmel.c
@@ -1422,7 +1422,6 @@ static void atmel_get_caps(struct atmel_spi *as)
 	unsigned int version;
 
 	version = atmel_get_version(as);
-	dev_info(&as->pdev->dev, "version: 0x%x\n", version);
 
 	as->caps.is_spi2 = version > 0x121;
 	as->caps.has_wdrbt = version >= 0x210;
@@ -1609,8 +1608,9 @@ static int atmel_spi_probe(struct platform_device *pdev)
 		goto out_free_dma;
 
 	/* go! */
-	dev_info(&pdev->dev, "Atmel SPI Controller at 0x%08lx (irq %d)\n",
-			(unsigned long)regs->start, irq);
+	dev_info(&pdev->dev, "Atmel SPI Controller version 0x%x at 0x%08lx (irq %d)\n",
+			atmel_get_version(as), (unsigned long)regs->start,
+			irq);
 
 	return 0;
 
-- 
2.11.0

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

end of thread, other threads:[~2017-06-06 19:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-05-30  5:33 [PATCH] spi: atmel: print version only after successful registration Baruch Siach
     [not found] ` <0ddb655ce326344aa32334e343ed4f0ba2996f72.1496122410.git.baruch-NswTu9S1W3P6gbPvEgmw2w@public.gmane.org>
2017-05-30  7:58   ` Nicolas Ferre
2017-06-06 19:07   ` Applied "spi: atmel: print version only after successful registration" to the spi tree 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).