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, 04 Mar 2015 11:05:16 -0800
From:	Stephen Boyd <sboyd@...eaurora.org>
To:	"Ivan T. Ivanov" <iivanov@...sol.com>,
	Rob Herring <robh+dt@...nel.org>,
	Pawel Moll <pawel.moll@....com>,
	Mark Rutland <mark.rutland@....com>,
	Ian Campbell <ijc+devicetree@...lion.org.uk>,
	Kumar Gala <galak@...eaurora.org>,
	Lee Jones <lee.jones@...aro.org>
CC:	Samuel Ortiz <sameo@...ux.intel.com>,
	Stanimir Varbanov <svarbanov@...sol.com>,
	devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
	linux-arm-msm@...r.kernel.org
Subject: Re: [PATCH v2] mfd: Add specific compatible strings for Qualcomm's
 SPMI PMIC's

On 03/04/15 02:19, Ivan T. Ivanov wrote:
> +
> +static const struct of_device_id pmic_spmi_id_table[] = {
> +	[COMMON_SUBTYPE]  = { .compatible = "qcom,spmi-pmic" },
> +	[PM8941_SUBTYPE]  = { .compatible = "qcom,pm8941" },
> +	[PM8841_SUBTYPE]  = { .compatible = "qcom,pm8841" },
> +	[PM8019_SUBTYPE]  = { .compatible = "qcom,pm8019" },
> +	[PM8226_SUBTYPE]  = { .compatible = "qcom,pm8226" },
> +	[PM8110_SUBTYPE]  = { .compatible = "qcom,pm8110" },
> +	[PMA8084_SUBTYPE] = { .compatible = "qcom,pma8084" },
> +	[PMI8962_SUBTYPE] = { .compatible = "qcom,pmi8962" },
> +	[PMD9635_SUBTYPE] = { .compatible = "qcom,pmd9635" },
> +	[PM8994_SUBTYPE]  = { .compatible = "qcom,pm8994" },
> +	[PMI8994_SUBTYPE] = { .compatible = "qcom,pmi8994" },
> +	[PM8916_SUBTYPE]  = { .compatible = "qcom,pm8916" },
> +	[PM8004_SUBTYPE]  = { .compatible = "qcom,pm8004" },
> +	[PM8909_SUBTYPE]  = { .compatible = "qcom,pm8909" },
> +	{ }
> +};

Also this seems error prone in the case where we may have skips between
pmic model numbers and then the of_device_id table is going to have a
sentinel in the middle of the table. It's probably better to store the
subtype number in the data field and iterate over the array.

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
a Linux Foundation Collaborative Project

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