lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20101110163732.GB6052@rakim.wolfsonmicro.main>
Date:	Wed, 10 Nov 2010 16:37:32 +0000
From:	Mark Brown <broonie@...nsource.wolfsonmicro.com>
To:	Bengt Jonsson <bengt.g.jonsson@...ricsson.com>
Cc:	Liam Girdwood <lrg@...mlogic.co.uk>, linux-kernel@...r.kernel.org,
	Linus Walleij <linus.walleij@...ricsson.com>,
	Mattias Wallin <mattias.wallin@...ricsson.com>
Subject: Re: [PATCH] regulator: enable supply regulator only when use count
 is zero

On Wed, Nov 10, 2010 at 11:06:22AM +0100, Bengt Jonsson wrote:
> Supply regulators are disabled only when the last
> reference count is removed on the child regulator
> (the use count goes from 1 to 0). This patch changes
> the behaviour of enable so the supply regulator is
> enabled only when the use count of the child
> regulator goes from 0 to 1.

Acked-by: Mark Brown <broonie@...nsource.wolfsonmicro.com>

> +	if (rdev->use_count == 0) {
> +		/* do we need to enable the supply regulator first */
> +		if (rdev->supply) {

This'd be a bit neater (and less invasive) as a single if statement with
&&.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ