diff mbox series

[v2,15/16] drm: avoid includes in drm_crtc_helper_internal.h

Message ID fb7fb2986e19f949bf3a9b16230a59e0f7aaebdf.1709898638.git.jani.nikula@intel.com (mailing list archive)
State New, archived
Headers show
Series drm: fix headers, add header test facility | expand

Commit Message

Jani Nikula March 8, 2024, 11:55 a.m. UTC
Prefer forward declarations over includes where possible.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/drm_crtc_helper_internal.h | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Comments

Lucas De Marchi March 8, 2024, 3:12 p.m. UTC | #1
On Fri, Mar 08, 2024 at 01:55:53PM +0200, Jani Nikula wrote:
>Prefer forward declarations over includes where possible.
>
>Signed-off-by: Jani Nikula <jani.nikula@intel.com>


Reviewed-by: Lucas De Marchi <lucas.demarchi@intel.com>

Lucas De Marchi

>---
> drivers/gpu/drm/drm_crtc_helper_internal.h | 10 ++++++----
> 1 file changed, 6 insertions(+), 4 deletions(-)
>
>diff --git a/drivers/gpu/drm/drm_crtc_helper_internal.h b/drivers/gpu/drm/drm_crtc_helper_internal.h
>index ed4deed07abd..8059f65c5d6c 100644
>--- a/drivers/gpu/drm/drm_crtc_helper_internal.h
>+++ b/drivers/gpu/drm/drm_crtc_helper_internal.h
>@@ -29,10 +29,12 @@
> #ifndef __DRM_CRTC_HELPER_INTERNAL_H__
> #define __DRM_CRTC_HELPER_INTERNAL_H__
>
>-#include <drm/drm_connector.h>
>-#include <drm/drm_crtc.h>
>-#include <drm/drm_encoder.h>
>-#include <drm/drm_modes.h>
>+enum drm_mode_status;
>+struct drm_connector;
>+struct drm_crtc;
>+struct drm_display_mode;
>+struct drm_encoder;
>+struct drm_modeset_acquire_ctx;
>
> /* drm_probe_helper.c */
> enum drm_mode_status drm_crtc_mode_valid(struct drm_crtc *crtc,
>-- 
>2.39.2
>
diff mbox series

Patch

diff --git a/drivers/gpu/drm/drm_crtc_helper_internal.h b/drivers/gpu/drm/drm_crtc_helper_internal.h
index ed4deed07abd..8059f65c5d6c 100644
--- a/drivers/gpu/drm/drm_crtc_helper_internal.h
+++ b/drivers/gpu/drm/drm_crtc_helper_internal.h
@@ -29,10 +29,12 @@ 
 #ifndef __DRM_CRTC_HELPER_INTERNAL_H__
 #define __DRM_CRTC_HELPER_INTERNAL_H__
 
-#include <drm/drm_connector.h>
-#include <drm/drm_crtc.h>
-#include <drm/drm_encoder.h>
-#include <drm/drm_modes.h>
+enum drm_mode_status;
+struct drm_connector;
+struct drm_crtc;
+struct drm_display_mode;
+struct drm_encoder;
+struct drm_modeset_acquire_ctx;
 
 /* drm_probe_helper.c */
 enum drm_mode_status drm_crtc_mode_valid(struct drm_crtc *crtc,