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: <20141013131622.GA27755@sirena.org.uk>
Date:	Mon, 13 Oct 2014 15:16:22 +0200
From:	Mark Brown <broonie@...nel.org>
To:	Romain Perier <romain.perier@...il.com>
Cc:	devicetree@...r.kernel.org, lgirdwood@...il.com,
	linux-kernel@...r.kernel.org, heiko@...ech.de,
	sameo@...ux.intel.com, lee.jones@...aro.org,
	grant.likely@...aro.org, robh@...nel.org, sre@...nel.org,
	dbaryshkov@...il.com, dwmw2@...radead.org, anton@...msg.org,
	ldewangan@...dia.com, linux-omap@...r.kernel.org,
	linux-tegra@...r.kernel.org
Subject: Re: [RFC PATCH v2 2/4] regulator: act8865: Add support to turn off
 all outputs

On Tue, Oct 07, 2014 at 07:45:02PM +0000, Romain Perier wrote:
> When the property "poweroff-source" is found in the
> devicetree, the function pm_power_off is defined. This function sends the
> rights bit fields to the global off control register. shutdown/poweroff
> commands are now supported for hardware components which use these PMU.

Reviwed-by: Mark Brown <broonie@...nel.org>

but...

> +	if (dev->of_node && is_system_poweroff_source(dev->of_node) &&
> +		!pm_power_off) {
> +		act8865_i2c_client = client;
> +		act8865->off_reg = off_reg;
> +		act8865->off_mask = off_mask;
> +		pm_power_off = act8865_power_off;
> +	}

Perhaps worth wrapping the dev->of_node check into the function?  I
imagine the same pattern will be quite common.

Might also make sense to warn if we've got the property but we're not
setting pm_power_off - it's indicating that things aren't working as
expected, an error will help users figure out what's going wrong.

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ