Unverified Commit f13478c9 authored by Rikard Falkeborn's avatar Rikard Falkeborn Committed by Maxime Ripard
Browse files

drm/sun4i: Constify static structs



A number of static variables are not modified and can be made const to
allow the compiler to put them in read-only memory.

Signed-off-by: default avatarRikard Falkeborn <rikard.falkeborn@gmail.com>
Signed-off-by: default avatarMaxime Ripard <maxime@cerno.tech>
Link: https://patchwork.freedesktop.org/patch/msgid/20200804215337.54594-1-rikard.falkeborn@gmail.com
parent c84adb30
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -769,7 +769,7 @@ static const struct sunxi_engine_ops sun4i_backend_engine_ops = {
	.vblank_quirk			= sun4i_backend_vblank_quirk,
};

static struct regmap_config sun4i_backend_regmap_config = {
static const struct regmap_config sun4i_backend_regmap_config = {
	.reg_bits	= 32,
	.val_bits	= 32,
	.reg_stride	= 4,
+1 −1
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ static const struct drm_mode_config_funcs sun4i_de_mode_config_funcs = {
	.fb_create		= drm_gem_fb_create,
};

static struct drm_mode_config_helper_funcs sun4i_de_mode_config_helpers = {
static const struct drm_mode_config_helper_funcs sun4i_de_mode_config_helpers = {
	.atomic_commit_tail	= drm_atomic_helper_commit_tail_rpm,
};

+1 −1
Original line number Diff line number Diff line
@@ -545,7 +545,7 @@ int sun4i_frontend_enable(struct sun4i_frontend *frontend)
}
EXPORT_SYMBOL(sun4i_frontend_enable);

static struct regmap_config sun4i_frontend_regmap_config = {
static const struct regmap_config sun4i_frontend_regmap_config = {
	.reg_bits	= 32,
	.val_bits	= 32,
	.reg_stride	= 4,
+1 −1
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ static int sun4i_lvds_get_modes(struct drm_connector *connector)
	return drm_panel_get_modes(lvds->panel, connector);
}

static struct drm_connector_helper_funcs sun4i_lvds_con_helper_funcs = {
static const struct drm_connector_helper_funcs sun4i_lvds_con_helper_funcs = {
	.get_modes	= sun4i_lvds_get_modes,
};

+2 −2
Original line number Diff line number Diff line
@@ -138,7 +138,7 @@ static enum drm_mode_status sun4i_rgb_mode_valid(struct drm_encoder *crtc,
	return MODE_OK;
}

static struct drm_connector_helper_funcs sun4i_rgb_con_helper_funcs = {
static const struct drm_connector_helper_funcs sun4i_rgb_con_helper_funcs = {
	.get_modes	= sun4i_rgb_get_modes,
};

@@ -180,7 +180,7 @@ static void sun4i_rgb_encoder_disable(struct drm_encoder *encoder)
	}
}

static struct drm_encoder_helper_funcs sun4i_rgb_enc_helper_funcs = {
static const struct drm_encoder_helper_funcs sun4i_rgb_enc_helper_funcs = {
	.disable	= sun4i_rgb_encoder_disable,
	.enable		= sun4i_rgb_encoder_enable,
	.mode_valid	= sun4i_rgb_mode_valid,
Loading