[PATCH v2] pxa/hx4700: use gpio arrays for global gpio initialization

Russell King - ARM Linux linux at arm.linux.org.uk
Thu Apr 28 05:05:28 EDT 2011

On Wed, Apr 27, 2011 at 08:50:19PM +0200, Philipp Zabel wrote:
> -	hx4700_gpio_request(ARRAY_AND_SIZE(global_gpios));
> +	ret = gpio_request_array(ARRAY_AND_SIZE(global_gpios));
> +	if (ret)
> +		pr_err ("hx4700: Failed to request GPIOs.\n");

No space between pr_err and (.

Does the return code convey useful information as to _why_ it failed?  If
yes, you really should print its value.  Knowing whether it's -EBUSY
(eg, already in use) instead of -EINVAL (eg, invalid GPIO number) really
helps to debug problems.

More information about the linux-arm-kernel mailing list