gpio: constify opaque pointer "data" in gpio_device_find()
The opaque pointer "data" in each match function used by gpio_device_find() is a pointer to const, thus the same argument passed to gpio_device_find() can adjusted similarly. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
committed by
Bartosz Golaszewski
parent
91510d5959
commit
4a92857d6e
@ -1171,7 +1171,7 @@ EXPORT_SYMBOL_GPL(gpiochip_remove);
|
||||
* If the function returns non-NULL, the returned reference must be freed by
|
||||
* the caller using gpio_device_put().
|
||||
*/
|
||||
struct gpio_device *gpio_device_find(void *data,
|
||||
struct gpio_device *gpio_device_find(const void *data,
|
||||
int (*match)(struct gpio_chip *gc,
|
||||
const void *data))
|
||||
{
|
||||
|
@ -628,7 +628,7 @@ int devm_gpiochip_add_data_with_key(struct device *dev, struct gpio_chip *gc,
|
||||
void *data, struct lock_class_key *lock_key,
|
||||
struct lock_class_key *request_key);
|
||||
|
||||
struct gpio_device *gpio_device_find(void *data,
|
||||
struct gpio_device *gpio_device_find(const void *data,
|
||||
int (*match)(struct gpio_chip *gc,
|
||||
const void *data));
|
||||
struct gpio_device *gpio_device_find_by_label(const char *label);
|
||||
|
Reference in New Issue
Block a user