aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-12-10 05:41:05 -0500
committerThierry Reding <treding@nvidia.com>2015-01-27 04:14:34 -0500
commitaa942f6ac43ab7373a025fe54780c8a852f33348 (patch)
tree8692b97fedab76decec425ad944cc7e164876513
parent8c8cb58ed6429da3cd41c1b44770c7a4b1b33933 (diff)
drm/tegra: Remove redundant zeroing out of memory
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>
-rw-r--r--drivers/gpu/drm/tegra/dc.c6
-rw-r--r--drivers/gpu/drm/tegra/output.c12
2 files changed, 0 insertions, 18 deletions
diff --git a/drivers/gpu/drm/tegra/dc.c b/drivers/gpu/drm/tegra/dc.c
index ae26cc054fff..3a8a7c227051 100644
--- a/drivers/gpu/drm/tegra/dc.c
+++ b/drivers/gpu/drm/tegra/dc.c
@@ -895,15 +895,9 @@ static int tegra_dc_page_flip(struct drm_crtc *crtc, struct drm_framebuffer *fb,
895 return 0; 895 return 0;
896} 896}
897 897
898static void drm_crtc_clear(struct drm_crtc *crtc)
899{
900 memset(crtc, 0, sizeof(*crtc));
901}
902
903static void tegra_dc_destroy(struct drm_crtc *crtc) 898static void tegra_dc_destroy(struct drm_crtc *crtc)
904{ 899{
905 drm_crtc_cleanup(crtc); 900 drm_crtc_cleanup(crtc);
906 drm_crtc_clear(crtc);
907} 901}
908 902
909static const struct drm_crtc_funcs tegra_crtc_funcs = { 903static const struct drm_crtc_funcs tegra_crtc_funcs = {
diff --git a/drivers/gpu/drm/tegra/output.c b/drivers/gpu/drm/tegra/output.c
index 6a5c7b81fbc5..0e4042ce904f 100644
--- a/drivers/gpu/drm/tegra/output.c
+++ b/drivers/gpu/drm/tegra/output.c
@@ -98,16 +98,10 @@ tegra_connector_detect(struct drm_connector *connector, bool force)
98 return status; 98 return status;
99} 99}
100 100
101static void drm_connector_clear(struct drm_connector *connector)
102{
103 memset(connector, 0, sizeof(*connector));
104}
105
106static void tegra_connector_destroy(struct drm_connector *connector) 101static void tegra_connector_destroy(struct drm_connector *connector)
107{ 102{
108 drm_connector_unregister(connector); 103 drm_connector_unregister(connector);
109 drm_connector_cleanup(connector); 104 drm_connector_cleanup(connector);
110 drm_connector_clear(connector);
111} 105}
112 106
113static const struct drm_connector_funcs connector_funcs = { 107static const struct drm_connector_funcs connector_funcs = {
@@ -117,15 +111,9 @@ static const struct drm_connector_funcs connector_funcs = {
117 .destroy = tegra_connector_destroy, 111 .destroy = tegra_connector_destroy,
118}; 112};
119 113
120static void drm_encoder_clear(struct drm_encoder *encoder)
121{
122 memset(encoder, 0, sizeof(*encoder));
123}
124
125static void tegra_encoder_destroy(struct drm_encoder *encoder) 114static void tegra_encoder_destroy(struct drm_encoder *encoder)
126{ 115{
127 drm_encoder_cleanup(encoder); 116 drm_encoder_cleanup(encoder);
128 drm_encoder_clear(encoder);
129} 117}
130 118
131static const struct drm_encoder_funcs encoder_funcs = { 119static const struct drm_encoder_funcs encoder_funcs = {