diff mbox series

[SRU,B/raspi2] spi: spidev: Completely disable the spidev warning

Message ID 20221124140741.208033-1-juerg.haefliger@canonical.com
State New
Headers show
Series [SRU,B/raspi2] spi: spidev: Completely disable the spidev warning | expand

Commit Message

Juerg Haefliger Nov. 24, 2022, 2:07 p.m. UTC
From: Phil Elwell <phil@raspberrypi.org>

BugLink: https://bugs.launchpad.net/bugs/1997763

An alternative strategy would be to use "rpi,spidev" instead, but that
would require many Raspberry Pi Device Tree changes.

Signed-off-by: Phil Elwell <phil@raspberrypi.org>

(cherry picked from commit 8caac6a83b5f681602cbd084e5585b7ff14b1384 rpi-5.4.y)
Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
---
 drivers/spi/spidev.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Cory Todd Nov. 25, 2022, 6:23 p.m. UTC | #1
On Thu, Nov 24, 2022 at 03:07:41PM +0100, Juerg Haefliger wrote:
> From: Phil Elwell <phil@raspberrypi.org>
> 
> BugLink: https://bugs.launchpad.net/bugs/1997763
> 
> An alternative strategy would be to use "rpi,spidev" instead, but that
> would require many Raspberry Pi Device Tree changes.
> 
> Signed-off-by: Phil Elwell <phil@raspberrypi.org>
> 
> (cherry picked from commit 8caac6a83b5f681602cbd084e5585b7ff14b1384 rpi-5.4.y)
> Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
> ---
>  drivers/spi/spidev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
> index 4c47facd5551..bb8c83b2e6db 100644
> --- a/drivers/spi/spidev.c
> +++ b/drivers/spi/spidev.c
> @@ -733,7 +733,7 @@ static int spidev_probe(struct spi_device *spi)
>  	 * compatible string, it is a Linux implementation thing
>  	 * rather than a description of the hardware.
>  	 */
> -	WARN(spi->dev.of_node &&
> +	WARN(0 && spi->dev.of_node &&
>  	     of_device_is_compatible(spi->dev.of_node, "spidev"),
>  	     "%pOF: buggy DT: spidev listed directly in DT\n", spi->dev.of_node);
>  

Acked-by: Cory Todd <cory.todd@canonical.com>
Tim Gardner Nov. 28, 2022, 1:53 p.m. UTC | #2
On 11/24/22 7:07 AM, Juerg Haefliger wrote:
> From: Phil Elwell <phil@raspberrypi.org>
> 
> BugLink: https://bugs.launchpad.net/bugs/1997763
> 
> An alternative strategy would be to use "rpi,spidev" instead, but that
> would require many Raspberry Pi Device Tree changes.
> 
> Signed-off-by: Phil Elwell <phil@raspberrypi.org>
> 
> (cherry picked from commit 8caac6a83b5f681602cbd084e5585b7ff14b1384 rpi-5.4.y)
> Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
> ---
>   drivers/spi/spidev.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
> index 4c47facd5551..bb8c83b2e6db 100644
> --- a/drivers/spi/spidev.c
> +++ b/drivers/spi/spidev.c
> @@ -733,7 +733,7 @@ static int spidev_probe(struct spi_device *spi)
>   	 * compatible string, it is a Linux implementation thing
>   	 * rather than a description of the hardware.
>   	 */
> -	WARN(spi->dev.of_node &&
> +	WARN(0 && spi->dev.of_node &&
>   	     of_device_is_compatible(spi->dev.of_node, "spidev"),
>   	     "%pOF: buggy DT: spidev listed directly in DT\n", spi->dev.of_node);
>   
Acked-by: Tim Gardner <tim.gardner@canonical.com>
Juerg Haefliger Dec. 9, 2022, 4:41 a.m. UTC | #3
This has been applied a while ago to bionic/linux-raspi2 master-next branch.

...Juerg


On Thu, 24 Nov 2022 15:07:41 +0100
Juerg Haefliger <juerg.haefliger@canonical.com> wrote:

> From: Phil Elwell <phil@raspberrypi.org>
> 
> BugLink: https://bugs.launchpad.net/bugs/1997763
> 
> An alternative strategy would be to use "rpi,spidev" instead, but that
> would require many Raspberry Pi Device Tree changes.
> 
> Signed-off-by: Phil Elwell <phil@raspberrypi.org>
> 
> (cherry picked from commit 8caac6a83b5f681602cbd084e5585b7ff14b1384 rpi-5.4.y)
> Signed-off-by: Juerg Haefliger <juerg.haefliger@canonical.com>
> ---
>  drivers/spi/spidev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
> index 4c47facd5551..bb8c83b2e6db 100644
> --- a/drivers/spi/spidev.c
> +++ b/drivers/spi/spidev.c
> @@ -733,7 +733,7 @@ static int spidev_probe(struct spi_device *spi)
>  	 * compatible string, it is a Linux implementation thing
>  	 * rather than a description of the hardware.
>  	 */
> -	WARN(spi->dev.of_node &&
> +	WARN(0 && spi->dev.of_node &&
>  	     of_device_is_compatible(spi->dev.of_node, "spidev"),
>  	     "%pOF: buggy DT: spidev listed directly in DT\n", spi->dev.of_node);
>
diff mbox series

Patch

diff --git a/drivers/spi/spidev.c b/drivers/spi/spidev.c
index 4c47facd5551..bb8c83b2e6db 100644
--- a/drivers/spi/spidev.c
+++ b/drivers/spi/spidev.c
@@ -733,7 +733,7 @@  static int spidev_probe(struct spi_device *spi)
 	 * compatible string, it is a Linux implementation thing
 	 * rather than a description of the hardware.
 	 */
-	WARN(spi->dev.of_node &&
+	WARN(0 && spi->dev.of_node &&
 	     of_device_is_compatible(spi->dev.of_node, "spidev"),
 	     "%pOF: buggy DT: spidev listed directly in DT\n", spi->dev.of_node);