All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/omap: Depend on CONFIG_OF
@ 2021-08-05 10:52 Laurent Pinchart
  2021-08-05 12:20 ` Daniel Vetter
  2021-08-05 15:07 ` Peter Stuge
  0 siblings, 2 replies; 4+ messages in thread
From: Laurent Pinchart @ 2021-08-05 10:52 UTC (permalink / raw)
  To: dri-devel; +Cc: Tomi Valkeinen

The driver accesses the drm_bridge.of_node field, which is present only
if CONFIG_OF is enabled. As all platforms using omapdrm are OF-based, we
can simply depend on CONFIG_OF.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 drivers/gpu/drm/omapdrm/Kconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/omapdrm/Kconfig b/drivers/gpu/drm/omapdrm/Kconfig
index e7281da5bc6a..999f1ca42849 100644
--- a/drivers/gpu/drm/omapdrm/Kconfig
+++ b/drivers/gpu/drm/omapdrm/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_OMAP
 	tristate "OMAP DRM"
-	depends on DRM
+	depends on DRM && OF
 	depends on ARCH_OMAP2PLUS || ARCH_MULTIPLATFORM
 	select OMAP2_DSS
 	select DRM_KMS_HELPER
-- 
Regards,

Laurent Pinchart


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

* Re: [PATCH] drm/omap: Depend on CONFIG_OF
  2021-08-05 10:52 [PATCH] drm/omap: Depend on CONFIG_OF Laurent Pinchart
@ 2021-08-05 12:20 ` Daniel Vetter
  2021-08-05 15:07 ` Peter Stuge
  1 sibling, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2021-08-05 12:20 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: dri-devel, Tomi Valkeinen

On Thu, Aug 05, 2021 at 01:52:54PM +0300, Laurent Pinchart wrote:
> The driver accesses the drm_bridge.of_node field, which is present only
> if CONFIG_OF is enabled. As all platforms using omapdrm are OF-based, we
> can simply depend on CONFIG_OF.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>

And thanks for not going down the "let's add dummy functions and inflict
lots of error case handling onto a driver that will never be used" route
instead.
-Daniel

> ---
>  drivers/gpu/drm/omapdrm/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/omapdrm/Kconfig b/drivers/gpu/drm/omapdrm/Kconfig
> index e7281da5bc6a..999f1ca42849 100644
> --- a/drivers/gpu/drm/omapdrm/Kconfig
> +++ b/drivers/gpu/drm/omapdrm/Kconfig
> @@ -1,7 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  config DRM_OMAP
>  	tristate "OMAP DRM"
> -	depends on DRM
> +	depends on DRM && OF
>  	depends on ARCH_OMAP2PLUS || ARCH_MULTIPLATFORM
>  	select OMAP2_DSS
>  	select DRM_KMS_HELPER
> -- 
> Regards,
> 
> Laurent Pinchart
> 

-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

* Re: [PATCH] drm/omap: Depend on CONFIG_OF
  2021-08-05 10:52 [PATCH] drm/omap: Depend on CONFIG_OF Laurent Pinchart
  2021-08-05 12:20 ` Daniel Vetter
@ 2021-08-05 15:07 ` Peter Stuge
  2021-08-05 15:09   ` Daniel Vetter
  1 sibling, 1 reply; 4+ messages in thread
From: Peter Stuge @ 2021-08-05 15:07 UTC (permalink / raw)
  To: Laurent Pinchart; +Cc: dri-devel, Tomi Valkeinen

Laurent Pinchart wrote:
> +++ b/drivers/gpu/drm/omapdrm/Kconfig
> @@ -1,7 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  config DRM_OMAP
>  	tristate "OMAP DRM"
> -	depends on DRM
> +	depends on DRM && OF
>  	depends on ARCH_OMAP2PLUS || ARCH_MULTIPLATFORM
>  	select OMAP2_DSS
>  	select DRM_KMS_HELPER

Would it make sense to select OF instead?


//Peter

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

* Re: [PATCH] drm/omap: Depend on CONFIG_OF
  2021-08-05 15:07 ` Peter Stuge
@ 2021-08-05 15:09   ` Daniel Vetter
  0 siblings, 0 replies; 4+ messages in thread
From: Daniel Vetter @ 2021-08-05 15:09 UTC (permalink / raw)
  To: Peter Stuge; +Cc: Laurent Pinchart, dri-devel, Tomi Valkeinen

On Thu, Aug 5, 2021 at 5:07 PM Peter Stuge <peter@stuge.se> wrote:
> Laurent Pinchart wrote:
> > +++ b/drivers/gpu/drm/omapdrm/Kconfig
> > @@ -1,7 +1,7 @@
> >  # SPDX-License-Identifier: GPL-2.0-only
> >  config DRM_OMAP
> >       tristate "OMAP DRM"
> > -     depends on DRM
> > +     depends on DRM && OF
> >       depends on ARCH_OMAP2PLUS || ARCH_MULTIPLATFORM
> >       select OMAP2_DSS
> >       select DRM_KMS_HELPER
>
> Would it make sense to select OF instead?

select is extremely harmful for any user-visible symbols or symbols
with dependencies. So no, not a good idea.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch

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

end of thread, other threads:[~2021-08-05 15:09 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-05 10:52 [PATCH] drm/omap: Depend on CONFIG_OF Laurent Pinchart
2021-08-05 12:20 ` Daniel Vetter
2021-08-05 15:07 ` Peter Stuge
2021-08-05 15:09   ` Daniel Vetter

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.