]> rtime.felk.cvut.cz Git - sojka/nv-tegra/linux-3.10.git/commitdiff
Fix 'const' propagation prob
authorJoe Korty <joe.korty@ccur.com>
Wed, 25 May 2016 12:47:49 +0000 (18:17 +0530)
committermobile promotions <svcmobile_promotions@nvidia.com>
Sun, 17 Jul 2016 21:00:00 +0000 (14:00 -0700)
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 73e9bdcc1d02de83793a192b5cfe78e4fab7f8c7..3507cf1f59a9ea2e6c8e68c150555a5142f73efa 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) {