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:	Wed, 28 May 2014 10:58:32 +0200
From:	Daniel Lezcano <daniel.lezcano@...aro.org>
To:	Chander Kashyap <chander.kashyap@...aro.org>,
	linux-pm@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-samsung-soc@...r.kernel.org
CC:	linux-arm-kernel@...ts.infradead.org, lorenzo.pieralisi@....com,
	rjw@...ysocki.net, kgene.kim@...sung.com, tomasz.figa@...il.com,
	Chander Kashyap <k.chander@...sung.com>
Subject: Re: [PATCH v6 1/6] driver: cpuidle-big-little: add of_device_id structure

On 05/16/2014 10:03 AM, Chander Kashyap wrote:
> This driver will be used by many big.Little Soc's. As of now it does
> string matching of hardcoded compatible string to init the driver. This
> comparison list will keep on growing with addition of new SoC's.
> Hence add of_device_id structure to collect the compatible strings of
> SoC's using this driver.
>
> Signed-off-by: Chander Kashyap <chander.kashyap@...aro.org>
> Signed-off-by: Chander Kashyap <k.chander@...sung.com>

Acked-by: Daniel Lezcano <daniel.lezcano@...aro.org>

> ---
>   drivers/cpuidle/cpuidle-big_little.c |   11 ++++++++++-
>   1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/cpuidle/cpuidle-big_little.c b/drivers/cpuidle/cpuidle-big_little.c
> index b45fc62..4cd02bd 100644
> --- a/drivers/cpuidle/cpuidle-big_little.c
> +++ b/drivers/cpuidle/cpuidle-big_little.c
> @@ -163,14 +163,23 @@ static int __init bl_idle_driver_init(struct cpuidle_driver *drv, int cpu_id)
>   	return 0;
>   }
>
> +static const struct of_device_id compatible_machine_match[] = {
> +	{ .compatible = "arm,vexpress,v2p-ca15_a7" },
> +	{},
> +};
> +
>   static int __init bl_idle_init(void)
>   {
>   	int ret;
> +	struct device_node *root = of_find_node_by_path("/");
> +
> +	if (!root)
> +		return -ENODEV;
>
>   	/*
>   	 * Initialize the driver just for a compliant set of machines
>   	 */
> -	if (!of_machine_is_compatible("arm,vexpress,v2p-ca15_a7"))
> +	if (!of_match_node(compatible_machine_match, root))
>   		return -ENODEV;
>   	/*
>   	 * For now the differentiation between little and big cores
>


-- 
  <http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog

--
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