Skip to content

Commit d8dfccd

Browse files
bijudasdianders
authored andcommitted
drm/bridge: Drop conditionals around of_node pointers
This patch is based on commit c9e358d ("driver-core: remove conditionals around devicetree pointers"). Having conditional around the of_node pointer of the drm_bridge structure turns out to make driver code use ugly #ifdef blocks. Drop the conditionals to simplify drivers. While this slightly increases the size of struct drm_bridge on non-OF system, the number of bridges used today and foreseen tomorrow on those systems is very low, so this shouldn't be an issue. So drop #if conditionals by adding struct device_node forward declaration. Suggested-by: Douglas Anderson <dianders@chromium.org> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com> Reviewed-by: Douglas Anderson <dianders@chromium.org> Reviewed-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com> Signed-off-by: Douglas Anderson <dianders@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230831080938.47454-3-biju.das.jz@bp.renesas.com
1 parent 39e0b96 commit d8dfccd

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

include/drm/drm_bridge.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,8 @@
3232
#include <drm/drm_mode_object.h>
3333
#include <drm/drm_modes.h>
3434

35+
struct device_node;
36+
3537
struct drm_bridge;
3638
struct drm_bridge_timings;
3739
struct drm_connector;
@@ -716,10 +718,8 @@ struct drm_bridge {
716718
struct drm_encoder *encoder;
717719
/** @chain_node: used to form a bridge chain */
718720
struct list_head chain_node;
719-
#ifdef CONFIG_OF
720721
/** @of_node: device node pointer to the bridge */
721722
struct device_node *of_node;
722-
#endif
723723
/** @list: to keep track of all added bridges */
724724
struct list_head list;
725725
/**

0 commit comments

Comments
 (0)