diff mbox series

[v2,06/10] drm: Define enum mode_set_atomic in drm_modeset_helper_tables.h

Message ID 20230111130206.29974-7-tzimmermann@suse.de (mailing list archive)
State New, archived
Headers show
Series drm: Do not include <linux/fb.h> unnecessarily | expand

Commit Message

Thomas Zimmermann Jan. 11, 2023, 1:02 p.m. UTC
Define enum mode_set_atomic next to the only interface that uses
the type. This will allow for removing several include statements
for drm_fb_helper.h. No functional changes.

Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
 include/drm/drm_fb_helper.h              | 5 -----
 include/drm/drm_modeset_helper_vtables.h | 6 +++++-
 2 files changed, 5 insertions(+), 6 deletions(-)

Comments

Ville Syrjälä Jan. 11, 2023, 4:03 p.m. UTC | #1
On Wed, Jan 11, 2023 at 02:02:02PM +0100, Thomas Zimmermann wrote:
> Define enum mode_set_atomic next to the only interface that uses
> the type. This will allow for removing several include statements
> for drm_fb_helper.h. No functional changes.
> 
> Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  include/drm/drm_fb_helper.h              | 5 -----
>  include/drm/drm_modeset_helper_vtables.h | 6 +++++-
>  2 files changed, 5 insertions(+), 6 deletions(-)
> 
> diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
> index b111dc7ada78..f443e1f11654 100644
> --- a/include/drm/drm_fb_helper.h
> +++ b/include/drm/drm_fb_helper.h
> @@ -37,11 +37,6 @@ struct drm_fb_helper;
>  
>  #include <drm/drm_client.h>
>  
> -enum mode_set_atomic {
> -	LEAVE_ATOMIC_MODE_SET,
> -	ENTER_ATOMIC_MODE_SET,
> -};
> -
>  /**
>   * struct drm_fb_helper_surface_size - describes fbdev size and scanout surface size
>   * @fb_width: fbdev width
> diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h
> index 77a540ad7dcd..206f495bbf06 100644
> --- a/include/drm/drm_modeset_helper_vtables.h
> +++ b/include/drm/drm_modeset_helper_vtables.h
> @@ -48,10 +48,14 @@
>   * To make this clear all the helper vtables are pulled together in this location here.
>   */
>  
> -enum mode_set_atomic;
>  struct drm_writeback_connector;
>  struct drm_writeback_job;
>  
> +enum mode_set_atomic {
> +	LEAVE_ATOMIC_MODE_SET,
> +	ENTER_ATOMIC_MODE_SET,
> +};
> +
>  /**
>   * struct drm_crtc_helper_funcs - helper operations for CRTCs
>   *
> -- 
> 2.39.0
diff mbox series

Patch

diff --git a/include/drm/drm_fb_helper.h b/include/drm/drm_fb_helper.h
index b111dc7ada78..f443e1f11654 100644
--- a/include/drm/drm_fb_helper.h
+++ b/include/drm/drm_fb_helper.h
@@ -37,11 +37,6 @@  struct drm_fb_helper;
 
 #include <drm/drm_client.h>
 
-enum mode_set_atomic {
-	LEAVE_ATOMIC_MODE_SET,
-	ENTER_ATOMIC_MODE_SET,
-};
-
 /**
  * struct drm_fb_helper_surface_size - describes fbdev size and scanout surface size
  * @fb_width: fbdev width
diff --git a/include/drm/drm_modeset_helper_vtables.h b/include/drm/drm_modeset_helper_vtables.h
index 77a540ad7dcd..206f495bbf06 100644
--- a/include/drm/drm_modeset_helper_vtables.h
+++ b/include/drm/drm_modeset_helper_vtables.h
@@ -48,10 +48,14 @@ 
  * To make this clear all the helper vtables are pulled together in this location here.
  */
 
-enum mode_set_atomic;
 struct drm_writeback_connector;
 struct drm_writeback_job;
 
+enum mode_set_atomic {
+	LEAVE_ATOMIC_MODE_SET,
+	ENTER_ATOMIC_MODE_SET,
+};
+
 /**
  * struct drm_crtc_helper_funcs - helper operations for CRTCs
  *