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>
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) {