drm/exynos: Constify function pointer structs
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Tue, 15 Dec 2015 11:21:06 +0000 (12:21 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 15 Dec 2015 12:44:56 +0000 (13:44 +0100)
Moves a bunch of junk to .rodata from .data.

 drivers/gpu/drm/exynos/exynosdrm.ko:
-.text                       125792
+.text                       125788
-.rodata                      10972
+.rodata                      11748
-.data                         6720
+.data                         5944

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Boris Brezillon <boris.brezillon@free-electrons.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1450178476-26284-19-git-send-email-boris.brezillon@free-electrons.com
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/exynos/exynos_dp_core.c
drivers/gpu/drm/exynos/exynos_drm_crtc.c
drivers/gpu/drm/exynos/exynos_drm_dpi.c
drivers/gpu/drm/exynos/exynos_drm_dsi.c
drivers/gpu/drm/exynos/exynos_drm_fb.c
drivers/gpu/drm/exynos/exynos_drm_mic.c
drivers/gpu/drm/exynos/exynos_drm_vidi.c
drivers/gpu/drm/exynos/exynos_hdmi.c

index 793e4977fcf758ebc03c099c898ebf33c2a564fc..b79c316c2ad2ce7b7eb48e152a49c41ab6e93431 100644 (file)
@@ -953,7 +953,7 @@ static void exynos_dp_connector_destroy(struct drm_connector *connector)
        drm_connector_cleanup(connector);
 }
 
-static struct drm_connector_funcs exynos_dp_connector_funcs = {
+static const struct drm_connector_funcs exynos_dp_connector_funcs = {
        .dpms = drm_atomic_helper_connector_dpms,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .detect = exynos_dp_detect,
@@ -998,7 +998,7 @@ static struct drm_encoder *exynos_dp_best_encoder(
        return &dp->encoder;
 }
 
-static struct drm_connector_helper_funcs exynos_dp_connector_helper_funcs = {
+static const struct drm_connector_helper_funcs exynos_dp_connector_helper_funcs = {
        .get_modes = exynos_dp_get_modes,
        .best_encoder = exynos_dp_best_encoder,
 };
@@ -1176,14 +1176,14 @@ static void exynos_dp_disable(struct drm_encoder *encoder)
 {
 }
 
-static struct drm_encoder_helper_funcs exynos_dp_encoder_helper_funcs = {
+static const struct drm_encoder_helper_funcs exynos_dp_encoder_helper_funcs = {
        .mode_fixup = exynos_dp_mode_fixup,
        .mode_set = exynos_dp_mode_set,
        .enable = exynos_dp_enable,
        .disable = exynos_dp_disable,
 };
 
-static struct drm_encoder_funcs exynos_dp_encoder_funcs = {
+static const struct drm_encoder_funcs exynos_dp_encoder_funcs = {
        .destroy = drm_encoder_cleanup,
 };
 
index 9d30a0fa32480af8f71cc17f3e452317891242d8..80f797414236af00ca4a10f9d04dd60a91623f44 100644 (file)
@@ -93,7 +93,7 @@ static void exynos_crtc_atomic_flush(struct drm_crtc *crtc,
        }
 }
 
-static struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = {
+static const struct drm_crtc_helper_funcs exynos_crtc_helper_funcs = {
        .enable         = exynos_drm_crtc_enable,
        .disable        = exynos_drm_crtc_disable,
        .mode_set_nofb  = exynos_drm_crtc_mode_set_nofb,
@@ -113,7 +113,7 @@ static void exynos_drm_crtc_destroy(struct drm_crtc *crtc)
        kfree(exynos_crtc);
 }
 
-static struct drm_crtc_funcs exynos_crtc_funcs = {
+static const struct drm_crtc_funcs exynos_crtc_funcs = {
        .set_config     = drm_atomic_helper_set_config,
        .page_flip      = drm_atomic_helper_page_flip,
        .destroy        = exynos_drm_crtc_destroy,
index 1dbf8dca2d6bbf858e48970e5d92e22d56f7b9d6..05350ae0785bc069bd7f1cb8d3178da594ccd69f 100644 (file)
@@ -57,7 +57,7 @@ static void exynos_dpi_connector_destroy(struct drm_connector *connector)
        drm_connector_cleanup(connector);
 }
 
-static struct drm_connector_funcs exynos_dpi_connector_funcs = {
+static const struct drm_connector_funcs exynos_dpi_connector_funcs = {
        .dpms = drm_atomic_helper_connector_dpms,
        .detect = exynos_dpi_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
@@ -100,7 +100,7 @@ exynos_dpi_best_encoder(struct drm_connector *connector)
        return &ctx->encoder;
 }
 
-static struct drm_connector_helper_funcs exynos_dpi_connector_helper_funcs = {
+static const struct drm_connector_helper_funcs exynos_dpi_connector_helper_funcs = {
        .get_modes = exynos_dpi_get_modes,
        .best_encoder = exynos_dpi_best_encoder,
 };
@@ -161,14 +161,14 @@ static void exynos_dpi_disable(struct drm_encoder *encoder)
        }
 }
 
-static struct drm_encoder_helper_funcs exynos_dpi_encoder_helper_funcs = {
+static const struct drm_encoder_helper_funcs exynos_dpi_encoder_helper_funcs = {
        .mode_fixup = exynos_dpi_mode_fixup,
        .mode_set = exynos_dpi_mode_set,
        .enable = exynos_dpi_enable,
        .disable = exynos_dpi_disable,
 };
 
-static struct drm_encoder_funcs exynos_dpi_encoder_funcs = {
+static const struct drm_encoder_funcs exynos_dpi_encoder_funcs = {
        .destroy = drm_encoder_cleanup,
 };
 
index bc09bba3132a21eb187ac486162ae8bcaa2b3701..d84a498ef099712c56f319c8333c8c8564ef457a 100644 (file)
@@ -1541,7 +1541,7 @@ static void exynos_dsi_connector_destroy(struct drm_connector *connector)
        connector->dev = NULL;
 }
 
-static struct drm_connector_funcs exynos_dsi_connector_funcs = {
+static const struct drm_connector_funcs exynos_dsi_connector_funcs = {
        .dpms = drm_atomic_helper_connector_dpms,
        .detect = exynos_dsi_detect,
        .fill_modes = drm_helper_probe_single_connector_modes,
@@ -1569,7 +1569,7 @@ exynos_dsi_best_encoder(struct drm_connector *connector)
        return &dsi->encoder;
 }
 
-static struct drm_connector_helper_funcs exynos_dsi_connector_helper_funcs = {
+static const struct drm_connector_helper_funcs exynos_dsi_connector_helper_funcs = {
        .get_modes = exynos_dsi_get_modes,
        .best_encoder = exynos_dsi_best_encoder,
 };
@@ -1622,14 +1622,14 @@ static void exynos_dsi_mode_set(struct drm_encoder *encoder,
        vm->hsync_len = m->hsync_end - m->hsync_start;
 }
 
-static struct drm_encoder_helper_funcs exynos_dsi_encoder_helper_funcs = {
+static const struct drm_encoder_helper_funcs exynos_dsi_encoder_helper_funcs = {
        .mode_fixup = exynos_dsi_mode_fixup,
        .mode_set = exynos_dsi_mode_set,
        .enable = exynos_dsi_enable,
        .disable = exynos_dsi_disable,
 };
 
-static struct drm_encoder_funcs exynos_dsi_encoder_funcs = {
+static const struct drm_encoder_funcs exynos_dsi_encoder_funcs = {
        .destroy = drm_encoder_cleanup,
 };
 
index f6bdb0d6f1421e67350d01023fc883100873a3ba..cbbb1a86e70ac2e0ab2dfb5860f4d5ae9bd766db 100644 (file)
@@ -110,7 +110,7 @@ static int exynos_drm_fb_dirty(struct drm_framebuffer *fb,
        return 0;
 }
 
-static struct drm_framebuffer_funcs exynos_drm_fb_funcs = {
+static const struct drm_framebuffer_funcs exynos_drm_fb_funcs = {
        .destroy        = exynos_drm_fb_destroy,
        .create_handle  = exynos_drm_fb_create_handle,
        .dirty          = exynos_drm_fb_dirty,
index 8994eab56ba8f42f0b0abbd2c1e4632a300df3b1..4eaef36aec5a42d9d1ccd70ff4f15f39d707648c 100644 (file)
@@ -389,7 +389,7 @@ already_disabled:
        mutex_unlock(&mic_mutex);
 }
 
-struct drm_bridge_funcs mic_bridge_funcs = {
+static const struct drm_bridge_funcs mic_bridge_funcs = {
        .disable = mic_disable,
        .post_disable = mic_post_disable,
        .pre_enable = mic_pre_enable,
index 319aa31954d1d816c242cec3d4bc6bcbb213f2ce..0be29c1b2c05409de381784fc7b2082ef5ff059f 100644 (file)
@@ -339,7 +339,7 @@ static void vidi_connector_destroy(struct drm_connector *connector)
 {
 }
 
-static struct drm_connector_funcs vidi_connector_funcs = {
+static const struct drm_connector_funcs vidi_connector_funcs = {
        .dpms = drm_atomic_helper_connector_dpms,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .detect = vidi_detect,
@@ -383,7 +383,7 @@ static struct drm_encoder *vidi_best_encoder(struct drm_connector *connector)
        return &ctx->encoder;
 }
 
-static struct drm_connector_helper_funcs vidi_connector_helper_funcs = {
+static const struct drm_connector_helper_funcs vidi_connector_helper_funcs = {
        .get_modes = vidi_get_modes,
        .best_encoder = vidi_best_encoder,
 };
@@ -431,14 +431,14 @@ static void exynos_vidi_disable(struct drm_encoder *encoder)
 {
 }
 
-static struct drm_encoder_helper_funcs exynos_vidi_encoder_helper_funcs = {
+static const struct drm_encoder_helper_funcs exynos_vidi_encoder_helper_funcs = {
        .mode_fixup = exynos_vidi_mode_fixup,
        .mode_set = exynos_vidi_mode_set,
        .enable = exynos_vidi_enable,
        .disable = exynos_vidi_disable,
 };
 
-static struct drm_encoder_funcs exynos_vidi_encoder_funcs = {
+static const struct drm_encoder_funcs exynos_vidi_encoder_funcs = {
        .destroy = drm_encoder_cleanup,
 };
 
index 7d5ca6ca4efee8a79e3d9ec63c17f0d75f1dd347..21a29dbce18c007f3a858394ec156b106247fd25 100644 (file)
@@ -956,7 +956,7 @@ static void hdmi_connector_destroy(struct drm_connector *connector)
        drm_connector_cleanup(connector);
 }
 
-static struct drm_connector_funcs hdmi_connector_funcs = {
+static const struct drm_connector_funcs hdmi_connector_funcs = {
        .dpms = drm_atomic_helper_connector_dpms,
        .fill_modes = drm_helper_probe_single_connector_modes,
        .detect = hdmi_detect,
@@ -1030,7 +1030,7 @@ static struct drm_encoder *hdmi_best_encoder(struct drm_connector *connector)
        return &hdata->encoder;
 }
 
-static struct drm_connector_helper_funcs hdmi_connector_helper_funcs = {
+static const struct drm_connector_helper_funcs hdmi_connector_helper_funcs = {
        .get_modes = hdmi_get_modes,
        .mode_valid = hdmi_mode_valid,
        .best_encoder = hdmi_best_encoder,
@@ -1641,14 +1641,14 @@ static void hdmi_disable(struct drm_encoder *encoder)
        hdata->powered = false;
 }
 
-static struct drm_encoder_helper_funcs exynos_hdmi_encoder_helper_funcs = {
+static const struct drm_encoder_helper_funcs exynos_hdmi_encoder_helper_funcs = {
        .mode_fixup     = hdmi_mode_fixup,
        .mode_set       = hdmi_mode_set,
        .enable         = hdmi_enable,
        .disable        = hdmi_disable,
 };
 
-static struct drm_encoder_funcs exynos_hdmi_encoder_funcs = {
+static const struct drm_encoder_funcs exynos_hdmi_encoder_funcs = {
        .destroy = drm_encoder_cleanup,
 };