| From 1d3b7bbf9388e6128739af92de971c7466b38eeb Mon Sep 17 00:00:00 2001 |
| From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@freescale.com> |
| Date: Sun, 2 Feb 2014 10:14:58 +0900 |
| Subject: fb: make fp_get_options name argument const |
| MIME-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| drm_get_connector_name now returns a const value, which causes the following |
| compilation warning: |
| |
| drivers/gpu/drm/drm_fb_helper.c: In function ‘drm_fb_helper_parse_command_line’: |
| drivers/gpu/drm/drm_fb_helper.c:127:3: warning: passing argument 1 of ‘fb_get_options’ discards ‘const’ qualifier from pointer target type [enabled by default] |
| In file included from drivers/gpu/drm/drm_fb_helper.c:35:0: |
| include/linux/fb.h:627:12: note: expected ‘char *’ but argument is of type ‘const char *’ |
| |
| As fb_get_options uses its name argument as read only, make it const. This |
| fixes the aforementioned compilation warning. |
| |
| Signed-off-by: Vincent Stehlé <vincent.stehle@freescale.com> |
| Cc: Jean-Christophe Plagniol-Villard <plagnioj@jcrosoft.com> |
| Cc: Tomi Valkeinen <tomi.valkeinen@ti.com> |
| Cc: Dave Airlie <airlied@redhat.com> |
| Cc: trivial@kernel.org |
| Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> |
| (cherry picked from commit a66e62ae56307e587e93d7ed4d83ea34c71d2eb9) |
| Signed-off-by: Simon Horman <horms@verge.net.au> |
| --- |
| drivers/video/fbmem.c | 2 +- |
| include/linux/fb.h | 2 +- |
| 2 files changed, 2 insertions(+), 2 deletions(-) |
| |
| --- a/drivers/video/fbmem.c |
| +++ b/drivers/video/fbmem.c |
| @@ -1881,7 +1881,7 @@ static int ofonly __read_mostly; |
| * |
| * NOTE: Needed to maintain backwards compatibility |
| */ |
| -int fb_get_options(char *name, char **option) |
| +int fb_get_options(const char *name, char **option) |
| { |
| char *opt, *options = NULL; |
| int retval = 0; |
| --- a/include/linux/fb.h |
| +++ b/include/linux/fb.h |
| @@ -624,7 +624,7 @@ extern void fb_pad_aligned_buffer(u8 *ds |
| extern void fb_set_suspend(struct fb_info *info, int state); |
| extern int fb_get_color_depth(struct fb_var_screeninfo *var, |
| struct fb_fix_screeninfo *fix); |
| -extern int fb_get_options(char *name, char **option); |
| +extern int fb_get_options(const char *name, char **option); |
| extern int fb_new_modelist(struct fb_info *info); |
| |
| extern struct fb_info *registered_fb[FB_MAX]; |