diff options
| author | Bhumika Goyal <bhumirks@gmail.com> | 2017-08-08 11:05:51 -0400 |
|---|---|---|
| committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2017-08-09 12:39:34 -0400 |
| commit | a5cb37d800a49922fdd80a20384b55b4a6b7bece (patch) | |
| tree | 661658d1df24b6c86a9be70aa9fd8558caa7d5ce /drivers/gpu/drm/pl111 | |
| parent | 91b39a4e282cfd729bd8a279ec296eb6af398bec (diff) | |
drm: make drm_mode_config_func const
Make these structures const as they are only stored in the funcs field
of a drm_mode_config structure which is of type const.
Done using Coccinelle:
@match disable optional_qualifier@
identifier s;
@@
static struct drm_mode_config_funcs s = {...};
@ref@
position p;
identifier match.s;
@@
s@p
@good1@
identifier y;
position ref.p;
identifier match.s;
@@
struct drm_mode_config y = {...,.funcs=&s@p,...};
@good2@
struct drm_mode_config y;
identifier match.s;
position ref.p;
@@
y.funcs = &s@p
@bad depends on !good1 && !good2@
position ref.p;
identifier match.s;
@@
s@p
@depends on forall !bad disable optional_qualifier@
identifier match.s;
@@
static
+ const
struct drm_mode_config_funcs s;
Signed-off-by: Bhumika Goyal <bhumirks@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: https://patchwork.freedesktop.org/patch/msgid/1502204751-16525-1-git-send-email-bhumirks@gmail.com
Diffstat (limited to 'drivers/gpu/drm/pl111')
| -rw-r--r-- | drivers/gpu/drm/pl111/pl111_drv.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/pl111/pl111_drv.c b/drivers/gpu/drm/pl111/pl111_drv.c index 29653fe5285c..0ea3ca823034 100644 --- a/drivers/gpu/drm/pl111/pl111_drv.c +++ b/drivers/gpu/drm/pl111/pl111_drv.c | |||
| @@ -72,7 +72,7 @@ | |||
| 72 | 72 | ||
| 73 | #define DRIVER_DESC "DRM module for PL111" | 73 | #define DRIVER_DESC "DRM module for PL111" |
| 74 | 74 | ||
| 75 | static struct drm_mode_config_funcs mode_config_funcs = { | 75 | static const struct drm_mode_config_funcs mode_config_funcs = { |
| 76 | .fb_create = drm_fb_cma_create, | 76 | .fb_create = drm_fb_cma_create, |
| 77 | .atomic_check = drm_atomic_helper_check, | 77 | .atomic_check = drm_atomic_helper_check, |
| 78 | .atomic_commit = drm_atomic_helper_commit, | 78 | .atomic_commit = drm_atomic_helper_commit, |
