Re: [PATCH 2/3] gpiolib: implement gpiochip_reserve

From: David Brownell
Date: Wed Mar 12 2008 - 19:03:26 EST


On Wednesday 12 March 2008, Anton Vorontsov wrote:
> > It
> > presumes the reserved bits and gpio chips are in fairly
> > close synch.
>
> Probably I don't understand the synch part here. The thing is that
> I'm replacing if (!chip) with if (!chip && !test_bit(FLAG_RESERVED,
> &desc->flags)), so now "else" code might be executed when gpio is
> either reserved or the range of gpios is already managed by the chip.

OK then.


> Below the patch with __init attribute added.
>
> - - - -
> From: Anton Vorontsov <avorontsov@xxxxxxxxxxxxx>
> Subject: gpiolib: implement gpiochip_reserve
>
> Function gpiochip_reserve() reserves range of gpios to use with
> platform code only, that is, this function used to mark specified
> range of gpios unavailable for the dynamic gpio base allocator.
>
> Signed-off-by: Anton Vorontsov <avorontsov@xxxxxxxxxxxxx>

Acked-by: David Brownell <dbrownell@xxxxxxxxxxxxxxxxxxxxx>

> ---
> ...
--
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/