Re: [PATCH 1/5] regulator: core: Resolve supply earlier

From: Mark Brown
Date: Mon Apr 11 2016 - 08:49:51 EST


On Mon, Apr 11, 2016 at 01:19:26PM +0100, Jon Hunter wrote:
> On 11/04/16 12:46, Thierry Reding wrote:

> > Perhaps moving the locking of the regulator_list_mutex down instead
> > could work. It seems to me like the first place where it would need to
> > be held is set_machine_constraints().

> Yes either that or we add a variable to regulator_resolve_supply() and
> regulator_dev_lookup() that indicates if the mutex is already held.

No, that sort of conditional locking is horrible and error prone.

> Moving the acquistion of mutex would be best/cleaner if that is ok.

Yes, we need to reorganize the locking.

Attachment: signature.asc
Description: PGP signature