diff mbox series

[3/5] spi: spi-uclass: Block dm_scan_fdt_dev with OF_CONTROL to prevent build failures

Message ID 20200902111804.22043-4-faiz_abbas@ti.com
State Changes Requested
Delegated to: Lokesh Vutla
Headers show
Series Add spi boot support to am335x-icev2 | expand

Commit Message

Faiz Abbas Sept. 2, 2020, 11:18 a.m. UTC
There are devices which don't use OF_CONTROL or OF_PLATDATA but instead
rely on statically defined platdata. Block dm_scan_fdt_dev() with both
configs to avoid build failures under this condition.

Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
---
 drivers/spi/spi-uclass.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Lokesh Vutla Sept. 7, 2020, 6:39 a.m. UTC | #1
Jagan,

On 02/09/20 4:48 pm, Faiz Abbas wrote:
> There are devices which don't use OF_CONTROL or OF_PLATDATA but instead
> rely on statically defined platdata. Block dm_scan_fdt_dev() with both
> configs to avoid build failures under this condition.
> 
> Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>

Can you ack this patch?

Thanks and regards,
Lokesh

> ---
>  drivers/spi/spi-uclass.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
> index cffd9cf0b0..55a8eed890 100644
> --- a/drivers/spi/spi-uclass.c
> +++ b/drivers/spi/spi-uclass.c
> @@ -497,7 +497,7 @@ UCLASS_DRIVER(spi) = {
>  	.id		= UCLASS_SPI,
>  	.name		= "spi",
>  	.flags		= DM_UC_FLAG_SEQ_ALIAS,
> -#if !CONFIG_IS_ENABLED(OF_PLATDATA)
> +#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
>  	.post_bind	= dm_scan_fdt_dev,
>  #endif
>  	.post_probe	= spi_post_probe,
>
Jagan Teki Sept. 10, 2020, 5:59 p.m. UTC | #2
On Wed, Sep 2, 2020 at 4:48 PM Faiz Abbas <faiz_abbas@ti.com> wrote:
>
> There are devices which don't use OF_CONTROL or OF_PLATDATA but instead
> rely on statically defined platdata. Block dm_scan_fdt_dev() with both
> configs to avoid build failures under this condition.
>
> Signed-off-by: Faiz Abbas <faiz_abbas@ti.com>
> ---
>  drivers/spi/spi-uclass.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
> index cffd9cf0b0..55a8eed890 100644
> --- a/drivers/spi/spi-uclass.c
> +++ b/drivers/spi/spi-uclass.c
> @@ -497,7 +497,7 @@ UCLASS_DRIVER(spi) = {
>         .id             = UCLASS_SPI,
>         .name           = "spi",
>         .flags          = DM_UC_FLAG_SEQ_ALIAS,
> -#if !CONFIG_IS_ENABLED(OF_PLATDATA)
> +#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)

Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
diff mbox series

Patch

diff --git a/drivers/spi/spi-uclass.c b/drivers/spi/spi-uclass.c
index cffd9cf0b0..55a8eed890 100644
--- a/drivers/spi/spi-uclass.c
+++ b/drivers/spi/spi-uclass.c
@@ -497,7 +497,7 @@  UCLASS_DRIVER(spi) = {
 	.id		= UCLASS_SPI,
 	.name		= "spi",
 	.flags		= DM_UC_FLAG_SEQ_ALIAS,
-#if !CONFIG_IS_ENABLED(OF_PLATDATA)
+#if CONFIG_IS_ENABLED(OF_CONTROL) && !CONFIG_IS_ENABLED(OF_PLATDATA)
 	.post_bind	= dm_scan_fdt_dev,
 #endif
 	.post_probe	= spi_post_probe,