--- zzzz-none-000/linux-2.6.39.4/drivers/uwb/lc-rc.c 2011-08-03 19:43:28.000000000 +0000 +++ puma6-arm-6490-729/linux-2.6.39.4/drivers/uwb/lc-rc.c 2021-11-10 13:23:10.000000000 +0000 @@ -39,9 +39,9 @@ #include "uwb-internal.h" -static int uwb_rc_index_match(struct device *dev, void *data) +static int uwb_rc_index_match(struct device *dev, const void *data) { - int *index = data; + const int *index = data; struct uwb_rc *rc = dev_get_drvdata(dev); if (rc->index == *index) @@ -333,9 +333,9 @@ } EXPORT_SYMBOL_GPL(uwb_rc_rm); -static int find_rc_try_get(struct device *dev, void *data) +static int find_rc_try_get(struct device *dev, const void *data) { - struct uwb_rc *target_rc = data; + const struct uwb_rc *target_rc = data; struct uwb_rc *rc = dev_get_drvdata(dev); if (rc == NULL) { @@ -385,9 +385,9 @@ return rc; } -static int find_rc_grandpa(struct device *dev, void *data) +static int find_rc_grandpa(struct device *dev, const void *data) { - struct device *grandpa_dev = data; + const struct device *grandpa_dev = data; struct uwb_rc *rc = dev_get_drvdata(dev); if (rc->uwb_dev.dev.parent->parent == grandpa_dev) { @@ -418,7 +418,7 @@ struct device *dev; struct uwb_rc *rc = NULL; - dev = class_find_device(&uwb_rc_class, NULL, (void *)grandpa_dev, + dev = class_find_device(&uwb_rc_class, NULL, grandpa_dev, find_rc_grandpa); if (dev) rc = dev_get_drvdata(dev); @@ -431,9 +431,9 @@ * * @returns the pointer to the radio controller, properly referenced */ -static int find_rc_dev(struct device *dev, void *data) +static int find_rc_dev(struct device *dev, const void *data) { - struct uwb_dev_addr *addr = data; + const struct uwb_dev_addr *addr = data; struct uwb_rc *rc = dev_get_drvdata(dev); if (rc == NULL) { @@ -452,8 +452,7 @@ struct device *dev; struct uwb_rc *rc = NULL; - dev = class_find_device(&uwb_rc_class, NULL, (void *)addr, - find_rc_dev); + dev = class_find_device(&uwb_rc_class, NULL, addr, find_rc_dev); if (dev) rc = dev_get_drvdata(dev);