Fix 'const' propagation prob
Joe Korty [Wed, 25 May 2016 12:47:49 +0000 (17:47 +0530)]
The strings pointed to are unchanging while in use,
so add a 'const' to the string definition.

drivers/usb/misc/usb_nvshieldled.c:
In function 'nvshieldled_probe':
drivers/usb/misc/usb_nvshieldled.c:394:7: warning:
passing argument 3 of 'of_property_read_string' from
incompatible pointer type [-Wincompatible-pointer-types]
       &edp_name)) {

In file included from drivers/usb/misc/usb_nvshieldled.c:26:0:
include/linux/of.h:268:12: note: expected 'const char **' but
argument is of type 'char **'
extern int of_property_read_string(struct device_node *np,

Bug 200187768

Change-Id: I989ecdf4d0c40ef032c2056889db6b0e399748bb
Signed-off-by: Joe Korty <joe.korty@ccur.com>
Signed-off-by: Gaurav Singh <gaursingh@nvidia.com>
Reviewed-on: http://git-master/r/1163936
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bibek Basu <bbasu@nvidia.com>

drivers/usb/misc/usb_nvshieldled.c

index 73e9bdc..3507cf1 100644 (file)
@@ -368,7 +368,7 @@ static int nvshieldled_probe(struct usb_interface *interface,
        struct nvshield_led *dev = NULL;
        int retval = -ENOMEM;
        struct device_node *np;
-       char *edp_name;
+       const char *edp_name;
 
        dev = kzalloc(sizeof(struct nvshield_led), GFP_KERNEL);
        if (dev == NULL) {