drm/tegra: Remove redundant zeroing out of memory
authorThierry Reding <treding@nvidia.com>
Wed, 10 Dec 2014 10:41:05 +0000 (11:41 +0100)
committerThierry Reding <treding@nvidia.com>
Tue, 27 Jan 2015 09:14:34 +0000 (10:14 +0100)
The DRM core now zeroes out the memory associated with CRTC, encoder and
connector objects upon cleanup, so there's no need to explicitly do that
in drivers anymore.

Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/tegra/dc.c
drivers/gpu/drm/tegra/output.c

index ae26cc0..3a8a7c2 100644 (file)
@@ -895,15 +895,9 @@ static int tegra_dc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
        return 0;
 }
 
-static void drm_crtc_clear(struct drm_crtc *crtc)
-{
-       memset(crtc, 0, sizeof(*crtc));
-}
-
 static void tegra_dc_destroy(struct drm_crtc *crtc)
 {
        drm_crtc_cleanup(crtc);
-       drm_crtc_clear(crtc);
 }
 
 static const struct drm_crtc_funcs tegra_crtc_funcs = {
index 6a5c7b8..0e4042c 100644 (file)
@@ -98,16 +98,10 @@ tegra_connector_detect(struct drm_connector *connector, bool force)
        return status;
 }
 
-static void drm_connector_clear(struct drm_connector *connector)
-{
-       memset(connector, 0, sizeof(*connector));
-}
-
 static void tegra_connector_destroy(struct drm_connector *connector)
 {
        drm_connector_unregister(connector);
        drm_connector_cleanup(connector);
-       drm_connector_clear(connector);
 }
 
 static const struct drm_connector_funcs connector_funcs = {
@@ -117,15 +111,9 @@ static const struct drm_connector_funcs connector_funcs = {
        .destroy = tegra_connector_destroy,
 };
 
-static void drm_encoder_clear(struct drm_encoder *encoder)
-{
-       memset(encoder, 0, sizeof(*encoder));
-}
-
 static void tegra_encoder_destroy(struct drm_encoder *encoder)
 {
        drm_encoder_cleanup(encoder);
-       drm_encoder_clear(encoder);
 }
 
 static const struct drm_encoder_funcs encoder_funcs = {