diff mbox series

drm/bridge: anx6345: Fix compilation breakage on systems without CONFIG_OF

Message ID 20191112204551.541449-1-maxime@cerno.tech (mailing list archive)
State New, archived
Headers show
Series drm/bridge: anx6345: Fix compilation breakage on systems without CONFIG_OF | expand

Commit Message

Maxime Ripard Nov. 12, 2019, 8:45 p.m. UTC
The driver assumes that the platform uses the device tree, and thus relies
on some fields (of_node) being declared in some structures (drm_bridge).

This isn't true for all platforms, so make sure we can only compile the
ANX6345 on platforms where DT support is selected.

Cc: Torsten Duwe <duwe@lst.de>
Fixes: 6aa192698089 ("drm/bridge: Add Analogix anx6345 support")
Signed-off-by: Maxime Ripard <maxime@cerno.tech>
---
 drivers/gpu/drm/bridge/analogix/Kconfig | 1 +
 1 file changed, 1 insertion(+)

Comments

Daniel Vetter Nov. 13, 2019, 8:05 a.m. UTC | #1
On Wed, Nov 13, 2019 at 8:56 AM Maxime Ripard <maxime@cerno.tech> wrote:
>
> The driver assumes that the platform uses the device tree, and thus relies
> on some fields (of_node) being declared in some structures (drm_bridge).
>
> This isn't true for all platforms, so make sure we can only compile the
> ANX6345 on platforms where DT support is selected.
>
> Cc: Torsten Duwe <duwe@lst.de>
> Fixes: 6aa192698089 ("drm/bridge: Add Analogix anx6345 support")
> Signed-off-by: Maxime Ripard <maxime@cerno.tech>

Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
> ---
>  drivers/gpu/drm/bridge/analogix/Kconfig | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/bridge/analogix/Kconfig b/drivers/gpu/drm/bridge/analogix/Kconfig
> index 1425a96a28c3..e1fa7d820373 100644
> --- a/drivers/gpu/drm/bridge/analogix/Kconfig
> +++ b/drivers/gpu/drm/bridge/analogix/Kconfig
> @@ -1,6 +1,7 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  config DRM_ANALOGIX_ANX6345
>         tristate "Analogix ANX6345 bridge"
> +       depends on OF
>         select DRM_ANALOGIX_DP
>         select DRM_KMS_HELPER
>         select REGMAP_I2C
> --
> 2.23.0
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
Maxime Ripard Nov. 13, 2019, 9:01 a.m. UTC | #2
On Wed, Nov 13, 2019 at 09:05:42AM +0100, Daniel Vetter wrote:
> On Wed, Nov 13, 2019 at 8:56 AM Maxime Ripard <maxime@cerno.tech> wrote:
> >
> > The driver assumes that the platform uses the device tree, and thus relies
> > on some fields (of_node) being declared in some structures (drm_bridge).
> >
> > This isn't true for all platforms, so make sure we can only compile the
> > ANX6345 on platforms where DT support is selected.
> >
> > Cc: Torsten Duwe <duwe@lst.de>
> > Fixes: 6aa192698089 ("drm/bridge: Add Analogix anx6345 support")
> > Signed-off-by: Maxime Ripard <maxime@cerno.tech>
>
> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>

Pushed, thanks

Maxime
diff mbox series

Patch

diff --git a/drivers/gpu/drm/bridge/analogix/Kconfig b/drivers/gpu/drm/bridge/analogix/Kconfig
index 1425a96a28c3..e1fa7d820373 100644
--- a/drivers/gpu/drm/bridge/analogix/Kconfig
+++ b/drivers/gpu/drm/bridge/analogix/Kconfig
@@ -1,6 +1,7 @@ 
 # SPDX-License-Identifier: GPL-2.0-only
 config DRM_ANALOGIX_ANX6345
 	tristate "Analogix ANX6345 bridge"
+	depends on OF
 	select DRM_ANALOGIX_DP
 	select DRM_KMS_HELPER
 	select REGMAP_I2C