mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
gpio: constify opaque pointer in gpio_device_find() match function
The match function used in gpio_device_find() should not modify the contents of passed opaque pointer, because such modification would not be necessary for actual matching and it could lead to quite unreadable, spaghetti code. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Linus Walleij <linus.walleij@linaro.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> [Bartosz: fix coding style in header] Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>
This commit is contained in:
committed by
Bartosz Golaszewski
parent
104e00bbc7
commit
faf6efd2e5
@@ -629,7 +629,8 @@ int devm_gpiochip_add_data_with_key(struct device *dev, struct gpio_chip *gc,
|
||||
struct lock_class_key *request_key);
|
||||
|
||||
struct gpio_device *gpio_device_find(void *data,
|
||||
int (*match)(struct gpio_chip *gc, void *data));
|
||||
int (*match)(struct gpio_chip *gc,
|
||||
const void *data));
|
||||
struct gpio_device *gpio_device_find_by_label(const char *label);
|
||||
struct gpio_device *gpio_device_find_by_fwnode(const struct fwnode_handle *fwnode);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user