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: <20150311013931.GA1017@earth>
Date:	Wed, 11 Mar 2015 02:39:31 +0100
From:	Sebastian Reichel <sre@...nel.org>
To:	Moritz Fischer <moritz.fischer@...us.com>
Cc:	dbaryshkov@...il.com, dwmw2@...radead.org,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-pm@...r.kernel.org
Subject: Re: [PATCH 1/2] power: reset: Add generic SYSCON register mapped
 poweroff.

Hi,

On Tue, Mar 10, 2015 at 04:21:09PM -0700, Moritz Fischer wrote:
> Add a generic SYSCON register mapped poweroff mechanism.

Driver looks mostly fine.

> [...]
> +#ifdef CONFIG_OF
> +static const struct of_device_id syscon_poweroff_of_match[] = {
> +	{ .compatible = "syscon-poweroff" },
> +	{}
> +};
> +MODULE_DEVICE_TABLE(of, syscon_poweroff_of_match);
> +#endif

You can remove the #ifdef, since the driver depends on OF.

> +static struct platform_driver syscon_poweroff_driver = {
> +	.probe = syscon_poweroff_probe,

You should set pm_power_off = NULL in .remove

> +	.driver = {
> +		.name = "syscon-poweroff",
> +		.of_match_table = syscon_poweroff_of_match,

This would fail for !CONFIG_OF. If the driver has optional OF
support you should use of_match_ptr(syscon_poweroff_of_match),
which is a preprocessor macro returning NULL for !CONFIG_OF.

> +	},
> +};
> +module_platform_driver(syscon_poweroff_driver);
> +
> +MODULE_LICENSE("GPL v2");
> +MODULE_AUTHOR("Moritz Fischer <moritz.fischer@...us.com>");
> +MODULE_DESCRIPTION("Generic SYSCON poweroff driver");
> +MODULE_ALIAS("platform:syscon-poweroff");
> -- 
> 1.9.3
> 

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ