Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1670750 > unrolled thread

[PATCH 2/2] drm/sun4i: add const to drm_encoder_helper_funcs structures

Started byBhumika Goyal <bhumirks@gmail.com>
First post2017-06-20 15:20 +0200
Last post2017-06-20 15:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 2/2] drm/sun4i: add const to drm_encoder_helper_funcs structures Bhumika Goyal <bhumirks@gmail.com> - 2017-06-20 15:20 +0200
    Re: [PATCH 2/2] drm/sun4i: add const to drm_encoder_helper_funcs  structures Maxime Ripard <maxime.ripard@free-electrons.com> - 2017-06-20 15:40 +0200

#1670750 — [PATCH 2/2] drm/sun4i: add const to drm_encoder_helper_funcs structures

FromBhumika Goyal <bhumirks@gmail.com>
Date2017-06-20 15:20 +0200
Subject[PATCH 2/2] drm/sun4i: add const to drm_encoder_helper_funcs structures
Message-ID<tUrez-FV-57@gated-at.bofh.it>
Add const to drm_encoder_helper_funcs structures as they are only passed
as an argument to the function drm_encoder_helper_add and this argument
is of type const. So, add const to these structures.

Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
---
 drivers/gpu/drm/sun4i/sun4i_rgb.c | 2 +-
 drivers/gpu/drm/sun4i/sun4i_tv.c  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/sun4i/sun4i_rgb.c b/drivers/gpu/drm/sun4i/sun4i_rgb.c
index 422b191..67847d2 100644
--- a/drivers/gpu/drm/sun4i/sun4i_rgb.c
+++ b/drivers/gpu/drm/sun4i/sun4i_rgb.c
@@ -181,7 +181,7 @@ static void sun4i_rgb_encoder_mode_set(struct drm_encoder *encoder,
 	clk_set_phase(tcon->dclk, 120);
 }
 
-static struct drm_encoder_helper_funcs sun4i_rgb_enc_helper_funcs = {
+static const struct drm_encoder_helper_funcs sun4i_rgb_enc_helper_funcs = {
 	.atomic_check	= sun4i_rgb_atomic_check,
 	.mode_set	= sun4i_rgb_encoder_mode_set,
 	.disable	= sun4i_rgb_encoder_disable,
diff --git a/drivers/gpu/drm/sun4i/sun4i_tv.c b/drivers/gpu/drm/sun4i/sun4i_tv.c
index 338b9e5..b20f97a 100644
--- a/drivers/gpu/drm/sun4i/sun4i_tv.c
+++ b/drivers/gpu/drm/sun4i/sun4i_tv.c
@@ -488,7 +488,7 @@ static void sun4i_tv_mode_set(struct drm_encoder *encoder,
 	regmap_write(tv->regs, SUN4I_TVE_SLAVE_REG, 0);
 }
 
-static struct drm_encoder_helper_funcs sun4i_tv_helper_funcs = {
+static const struct drm_encoder_helper_funcs sun4i_tv_helper_funcs = {
 	.atomic_check	= sun4i_tv_atomic_check,
 	.disable	= sun4i_tv_disable,
 	.enable		= sun4i_tv_enable,
-- 
2.7.4

[toc] | [next] | [standalone]


#1670768 — Re: [PATCH 2/2] drm/sun4i: add const to drm_encoder_helper_funcs structures

FromMaxime Ripard <maxime.ripard@free-electrons.com>
Date2017-06-20 15:40 +0200
SubjectRe: [PATCH 2/2] drm/sun4i: add const to drm_encoder_helper_funcs structures
Message-ID<tUrxU-Mz-19@gated-at.bofh.it>
In reply to#1670750

[Multipart message — attachments visible in raw view] — view raw

On Tue, Jun 20, 2017 at 06:38:00PM +0530, Bhumika Goyal wrote:
> Add const to drm_encoder_helper_funcs structures as they are only passed
> as an argument to the function drm_encoder_helper_add and this argument
> is of type const. So, add const to these structures.
> 
> Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>

Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web