Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1716263
| From | Arvind Yadav <arvind.yadav.cs@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH] staging: vboxvideo: constify drm_fb_helper_funcs |
| Date | 2017-08-21 12:10 +0200 |
| Message-ID | <ugROG-339-1@gated-at.bofh.it> (permalink) |
| Organization | linux.* mail to news gateway |
drm_fb_helper_funcs are not supposed to change at runtime.
All functions working with drm_fb_helper_funcs provided by
<drm/drm_fb_helper.h> work with const drm_fb_helper_funcs.
So mark the non-const structs as const.
Signed-off-by: Arvind Yadav <arvind.yadav.cs@gmail.com>
---
drivers/staging/vboxvideo/vbox_fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/vboxvideo/vbox_fb.c b/drivers/staging/vboxvideo/vbox_fb.c
index 35f6d9f..70d99b7 100644
--- a/drivers/staging/vboxvideo/vbox_fb.c
+++ b/drivers/staging/vboxvideo/vbox_fb.c
@@ -330,7 +330,7 @@ static void vbox_fb_gamma_get(struct drm_crtc *crtc, u16 *red, u16 *green,
*blue = regno;
}
-static struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
+static const struct drm_fb_helper_funcs vbox_fb_helper_funcs = {
.gamma_set = vbox_fb_gamma_set,
.gamma_get = vbox_fb_gamma_get,
.fb_probe = vboxfb_create,
--
1.9.1
Back to linux.kernel | Previous | Next — Next in thread | Find similar | Unroll thread
[PATCH] staging: vboxvideo: constify drm_fb_helper_funcs Arvind Yadav <arvind.yadav.cs@gmail.com> - 2017-08-21 12:10 +0200 Re: [PATCH] staging: vboxvideo: constify drm_fb_helper_funcs Hans de Goede <hdegoede@redhat.com> - 2017-08-21 13:40 +0200 Re: [PATCH] staging: vboxvideo: constify drm_fb_helper_funcs Greg KH <gregkh@linuxfoundation.org> - 2017-08-23 03:40 +0200
csiph-web