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]
Date:	Tue, 8 Aug 2006 12:45:48 +0000
From:	Pavel Machek <pavel@...e.cz>
To:	Shem Multinymous <multinymous@...il.com>
Cc:	Robert Love <rlove@...ve.org>, Jean Delvare <khali@...ux-fr.org>,
	Greg Kroah-Hartman <gregkh@...e.de>,
	Alan Cox <alan@...rguk.ukuu.org.uk>,
	linux-kernel@...r.kernel.org, hdaps-devel@...ts.sourceforge.net
Subject: Re: [PATCH 10/12] hdaps: Power off accelerometer on suspend and unload

Hi!

> This patch disables accelerometer power and stops its polling by the
> embedded controller upon suspend and module unload. The power saving
> is negligible, but it's the right thing to do.
> 
> Signed-off-by: Shem Multinymous <multinymous@...il.com>

Signed-off-by: Pavel Machek <pavel@...e.cz>


> +/*
> + * hdaps_device_shutdown - power off the accelerometer. Can sleep.
> + */
> +static void hdaps_device_shutdown(void) {

{ on newline?

> +	if (hdaps_set_power(0))
> +		printk(KERN_WARNING "hdaps: cannot power off\n");
> +	if (hdaps_set_ec_config(0, 1))
> +		printk(KERN_WARNING "hdaps: cannot stop EC sampling\n");
> +}

Maybe propagate error value?

> +static int hdaps_suspend(struct platform_device *dev, pm_message_t state)
> +{
> +	hdaps_device_shutdown();
> +	return 0;
> +}
> +

-- 
Thanks for all the (sleeping) penguins.
-
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