Re: [Linux-kernel] [PATCH 1/4] drivers/gpio: devres.c: allow gpio array requests for managed devices
From: Ben Hutchings
Date: Fri Jun 20 2014 - 18:28:14 EST
On Thu, 2014-06-19 at 16:46 +0100, Rob Jones wrote:
[...]
> +int devm_gpio_request_array(struct device *dev,
> + const struct gpio *array,
> + size_t num)
> +{
> + int i, err = 0;
> +
> + for (i = 0; i < num; i++, array++) {
> + err = devm_gpio_request_one(dev,
> + array->gpio,
> + array->flags,
> + array->label);
> + if (err) {
> + while (i--)
> + devm_gpio_free(dev, (--array)->gpio);
Missing break here.
> + }
> + }
> +
> + return err;
> +}
> +EXPORT_SYMBOL(devm_gpio_request_array);
[...]
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/