From: Bartosz Golaszewski Date: Tue, 9 Jul 2019 11:02:24 +0000 (+0200) Subject: tests: gpio-mockup: constify num_lines X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=53cb270293a72f78c15dcb67b2fd013a4ba76edf;p=qemu-gpiodev%2Flibgpiod.git tests: gpio-mockup: constify num_lines The array pointed to by num_lines is never modified so make it really constant. Signed-off-by: Bartosz Golaszewski --- diff --git a/tests/mockup/gpio-mockup.c b/tests/mockup/gpio-mockup.c index 5a2b64c..d8a80f7 100644 --- a/tests/mockup/gpio-mockup.c +++ b/tests/mockup/gpio-mockup.c @@ -165,7 +165,7 @@ EXPORT void gpio_mockup_unref(struct gpio_mockup *ctx) } static char *make_module_param_string(unsigned int num_chips, - unsigned int *num_lines, int flags) + const unsigned int *num_lines, int flags) { char *params, *new; unsigned int i; @@ -250,7 +250,7 @@ static struct gpio_mockup_chip *make_chip(const char *sysname, } EXPORT int gpio_mockup_probe(struct gpio_mockup *ctx, unsigned int num_chips, - unsigned int *chip_sizes, int flags) + const unsigned int *chip_sizes, int flags) { const char *devpath, *devnode, *sysname, *action; struct gpio_mockup_chip *chip; diff --git a/tests/mockup/gpio-mockup.h b/tests/mockup/gpio-mockup.h index a4f3058..d91f3f8 100644 --- a/tests/mockup/gpio-mockup.h +++ b/tests/mockup/gpio-mockup.h @@ -17,7 +17,7 @@ void gpio_mockup_ref(struct gpio_mockup *ctx); void gpio_mockup_unref(struct gpio_mockup *ctx); int gpio_mockup_probe(struct gpio_mockup *ctx, unsigned int num_chips, - unsigned int *chip_sizes, int flags); + const unsigned int *chip_sizes, int flags); int gpio_mockup_remove(struct gpio_mockup *ctx); const char *gpio_mockup_chip_name(struct gpio_mockup *ctx, unsigned int idx);