[PATCH 1/2] drivers: create a pin control subsystem v7
Linus Walleij
linus.walleij at linaro.org
Wed Sep 28 05:18:59 EDT 2011
On Tue, Sep 27, 2011 at 11:30 AM, Stijn Devriendt <highguy at gmail.com> wrote:
>> + spin_unlock(&desc->lock);
>
> Now this is racing with...
> (...)
> ... this:
>
>> + spin_lock(&desc->lock);
>> + desc->mux_requested = true;
>> + strncpy(desc->mux_function, function, sizeof(desc->mux_function));
>> + spin_unlock(&desc->lock);
Good catch!
I've fixed it by setting ->mux_requested immediatelty and then
later release it (inside a lock) if something fails.
Yours,
Linus Walleij
More information about the linux-arm-kernel
mailing list