[PATCH] pxa/mioa701: use gpio arrays for global and gsm gpio initialization

Robert Jarzmik robert.jarzmik at free.fr
Thu Apr 28 03:10:58 EDT 2011


Eric Miao <eric.y.miao at gmail.com> writes:

> On Fri, Apr 22, 2011 at 6:35 PM, pHilipp Zabel <philipp.zabel at gmail.com> wrote:
>> On Thu, Apr 21, 2011 at 11:33 PM, Robert Jarzmik <robert.jarzmik at free.fr> wrote:
>>> Philipp Zabel <philipp.zabel at gmail.com> writes:
>>>
>>>> gpio_request_arrays() / gpio_free_arrays() are functional replacements for
>>>> mio_gpio_request() / mio_gpio_free(), which are now obsolete.
>>>>
>>>> Signed-off-by: Philipp Zabel <philipp.zabel at gmail.com>
>>>
>>> Acked-by: Robert Jarzmik <robert.jarzmik at free.fr>
>>
>> Dmitry Artamonow pointed out that contrary to
>> hx4700/mio_gpio_request(), gpio_request_array() is silent when a
>> request fails. Would you prefer something like
>>
>> int rc;
>> rc = gpio_request_array(ARRAY_AND_SIZE(global_gpios));
>> if (rc)
>>    pr_err("MioA701: Failed to request GPIOs.\n");
>>
>> in there?
>>
>
> That will always be good.
Indeed.

pHilipp, keep the ack, the usage of gpio_request_array() is a very good
idea. Reporting the error is even better than saying nothing.

Cheers.

-- 
Robert



More information about the linux-arm-kernel mailing list