Skip to content

Commit a08e062

Browse files
drm/ssd130x: Drop _helper prefix from struct drm_*_helper_funcs callbacks
The driver uses a naming convention where functions for struct drm_*_funcs callbacks are named ssd130x_$object_$operation, while the callbacks for struct drm_*_helper_funcs are named ssd130x_$object_helper_$operation. The idea is that this helper_ prefix in the function names denote that are for struct drm_*_helper_funcs callbacks. This convention was copied from other drivers when ssd130x was written, but Maxime pointed out that is the exception rather than the norm. So let's get rid of the _helper prefixes from the function handlers names. Suggested-by: Maxime Ripard <mripard@kernel.org> Signed-off-by: Javier Martinez Canillas <javierm@redhat.com> Reviewed-by: Maxime Ripard <mripard@kernel.org> Link: https://patchwork.freedesktop.org/patch/msgid/20230914195138.1518065-1-javierm@redhat.com
1 parent 2682768 commit a08e062

1 file changed

Lines changed: 23 additions & 23 deletions

File tree

drivers/gpu/drm/solomon/ssd130x.c

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,8 @@ static int ssd130x_fb_blit_rect(struct drm_framebuffer *fb,
630630
return ret;
631631
}
632632

633-
static int ssd130x_primary_plane_helper_atomic_check(struct drm_plane *plane,
634-
struct drm_atomic_state *state)
633+
static int ssd130x_primary_plane_atomic_check(struct drm_plane *plane,
634+
struct drm_atomic_state *state)
635635
{
636636
struct drm_device *drm = plane->dev;
637637
struct ssd130x_device *ssd130x = drm_to_ssd130x(drm);
@@ -667,8 +667,8 @@ static int ssd130x_primary_plane_helper_atomic_check(struct drm_plane *plane,
667667
return 0;
668668
}
669669

670-
static void ssd130x_primary_plane_helper_atomic_update(struct drm_plane *plane,
671-
struct drm_atomic_state *state)
670+
static void ssd130x_primary_plane_atomic_update(struct drm_plane *plane,
671+
struct drm_atomic_state *state)
672672
{
673673
struct drm_plane_state *plane_state = drm_atomic_get_new_plane_state(state, plane);
674674
struct drm_plane_state *old_plane_state = drm_atomic_get_old_plane_state(state, plane);
@@ -701,8 +701,8 @@ static void ssd130x_primary_plane_helper_atomic_update(struct drm_plane *plane,
701701
drm_dev_exit(idx);
702702
}
703703

704-
static void ssd130x_primary_plane_helper_atomic_disable(struct drm_plane *plane,
705-
struct drm_atomic_state *state)
704+
static void ssd130x_primary_plane_atomic_disable(struct drm_plane *plane,
705+
struct drm_atomic_state *state)
706706
{
707707
struct drm_device *drm = plane->dev;
708708
struct ssd130x_device *ssd130x = drm_to_ssd130x(drm);
@@ -777,9 +777,9 @@ static void ssd130x_primary_plane_destroy_state(struct drm_plane *plane,
777777

778778
static const struct drm_plane_helper_funcs ssd130x_primary_plane_helper_funcs = {
779779
DRM_GEM_SHADOW_PLANE_HELPER_FUNCS,
780-
.atomic_check = ssd130x_primary_plane_helper_atomic_check,
781-
.atomic_update = ssd130x_primary_plane_helper_atomic_update,
782-
.atomic_disable = ssd130x_primary_plane_helper_atomic_disable,
780+
.atomic_check = ssd130x_primary_plane_atomic_check,
781+
.atomic_update = ssd130x_primary_plane_atomic_update,
782+
.atomic_disable = ssd130x_primary_plane_atomic_disable,
783783
};
784784

785785
static const struct drm_plane_funcs ssd130x_primary_plane_funcs = {
@@ -791,8 +791,8 @@ static const struct drm_plane_funcs ssd130x_primary_plane_funcs = {
791791
.destroy = drm_plane_cleanup,
792792
};
793793

794-
static enum drm_mode_status ssd130x_crtc_helper_mode_valid(struct drm_crtc *crtc,
795-
const struct drm_display_mode *mode)
794+
static enum drm_mode_status ssd130x_crtc_mode_valid(struct drm_crtc *crtc,
795+
const struct drm_display_mode *mode)
796796
{
797797
struct ssd130x_device *ssd130x = drm_to_ssd130x(crtc->dev);
798798

@@ -807,8 +807,8 @@ static enum drm_mode_status ssd130x_crtc_helper_mode_valid(struct drm_crtc *crtc
807807
return MODE_OK;
808808
}
809809

810-
static int ssd130x_crtc_helper_atomic_check(struct drm_crtc *crtc,
811-
struct drm_atomic_state *state)
810+
static int ssd130x_crtc_atomic_check(struct drm_crtc *crtc,
811+
struct drm_atomic_state *state)
812812
{
813813
struct drm_device *drm = crtc->dev;
814814
struct ssd130x_device *ssd130x = drm_to_ssd130x(drm);
@@ -882,8 +882,8 @@ static void ssd130x_crtc_destroy_state(struct drm_crtc *crtc,
882882
* the screen in the primary plane's atomic_disable function.
883883
*/
884884
static const struct drm_crtc_helper_funcs ssd130x_crtc_helper_funcs = {
885-
.mode_valid = ssd130x_crtc_helper_mode_valid,
886-
.atomic_check = ssd130x_crtc_helper_atomic_check,
885+
.mode_valid = ssd130x_crtc_mode_valid,
886+
.atomic_check = ssd130x_crtc_atomic_check,
887887
};
888888

889889
static const struct drm_crtc_funcs ssd130x_crtc_funcs = {
@@ -895,8 +895,8 @@ static const struct drm_crtc_funcs ssd130x_crtc_funcs = {
895895
.atomic_destroy_state = ssd130x_crtc_destroy_state,
896896
};
897897

898-
static void ssd130x_encoder_helper_atomic_enable(struct drm_encoder *encoder,
899-
struct drm_atomic_state *state)
898+
static void ssd130x_encoder_atomic_enable(struct drm_encoder *encoder,
899+
struct drm_atomic_state *state)
900900
{
901901
struct drm_device *drm = encoder->dev;
902902
struct ssd130x_device *ssd130x = drm_to_ssd130x(drm);
@@ -921,8 +921,8 @@ static void ssd130x_encoder_helper_atomic_enable(struct drm_encoder *encoder,
921921
return;
922922
}
923923

924-
static void ssd130x_encoder_helper_atomic_disable(struct drm_encoder *encoder,
925-
struct drm_atomic_state *state)
924+
static void ssd130x_encoder_atomic_disable(struct drm_encoder *encoder,
925+
struct drm_atomic_state *state)
926926
{
927927
struct drm_device *drm = encoder->dev;
928928
struct ssd130x_device *ssd130x = drm_to_ssd130x(drm);
@@ -935,15 +935,15 @@ static void ssd130x_encoder_helper_atomic_disable(struct drm_encoder *encoder,
935935
}
936936

937937
static const struct drm_encoder_helper_funcs ssd130x_encoder_helper_funcs = {
938-
.atomic_enable = ssd130x_encoder_helper_atomic_enable,
939-
.atomic_disable = ssd130x_encoder_helper_atomic_disable,
938+
.atomic_enable = ssd130x_encoder_atomic_enable,
939+
.atomic_disable = ssd130x_encoder_atomic_disable,
940940
};
941941

942942
static const struct drm_encoder_funcs ssd130x_encoder_funcs = {
943943
.destroy = drm_encoder_cleanup,
944944
};
945945

946-
static int ssd130x_connector_helper_get_modes(struct drm_connector *connector)
946+
static int ssd130x_connector_get_modes(struct drm_connector *connector)
947947
{
948948
struct ssd130x_device *ssd130x = drm_to_ssd130x(connector->dev);
949949
struct drm_display_mode *mode;
@@ -963,7 +963,7 @@ static int ssd130x_connector_helper_get_modes(struct drm_connector *connector)
963963
}
964964

965965
static const struct drm_connector_helper_funcs ssd130x_connector_helper_funcs = {
966-
.get_modes = ssd130x_connector_helper_get_modes,
966+
.get_modes = ssd130x_connector_get_modes,
967967
};
968968

969969
static const struct drm_connector_funcs ssd130x_connector_funcs = {

0 commit comments

Comments
 (0)