[PATCH V5 1/2] powerpc/85xx: Add QE common init function
Scott Wood
scottwood at freescale.com
Sat Sep 28 03:00:37 EST 2013
On Thu, 2013-09-26 at 17:37 +0800, Xie Xiaobo wrote:
> +#ifdef CONFIG_QUICC_ENGINE
> +void __init mpc85xx_qe_init(void)
> +{
> + struct device_node *np;
> +
> + np = of_find_compatible_node(NULL, NULL, "fsl,qe");
> + if (!np) {
> + np = of_find_node_by_name(NULL, "qe");
> + if (!np) {
> + pr_err("%s: Could not find Quicc Engine node\n",
> + __func__);
> + return;
> + }
> + }
> +
> + qe_reset();
> + of_node_put(np);
You're missing the of_device_is_available() check:
> - np = of_find_compatible_node(NULL, NULL, "fsl,qe");
> - if (!np) {
> - np = of_find_node_by_name(NULL, "qe");
> - if (!np)
> - return;
> - }
> -
> - if (!of_device_is_available(np)) {
> - of_node_put(np);
> - return;
> - }
> -
> - qe_reset();
> - of_node_put(np);
-Scott
More information about the Linuxppc-dev
mailing list