[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAOZdJXUeY-_mmBLoA25_g4eLqwHxYX4c_ECbU+KYqfM307THNQ@mail.gmail.com>
Date: Tue, 3 Jul 2012 12:46:24 +0000
From: Tabi Timur-B04825 <B04825@...escale.com>
To: Zhao Chenhui-B35336 <B35336@...escale.com>
CC: "linuxppc-dev@...ts.ozlabs.org" <linuxppc-dev@...ts.ozlabs.org>,
Wood Scott-B07421 <B07421@...escale.com>,
"galak@...nel.crashing.org" <galak@...nel.crashing.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v7 1/5] powerpc/85xx: implement hardware timebase sync
On Tue, Jul 3, 2012 at 5:21 AM, Zhao Chenhui <chenhui.zhao@...escale.com> wrote:
> + np = of_find_matching_node(NULL, mpc85xx_smp_guts_ids);
> + if (np) {
> + guts = of_iomap(np, 0);
> + of_node_put(np);
> + if (!guts) {
> + pr_err("%s: Could not map guts node address\n",
> + __func__);
> + return;
> + }
> + smp_85xx_ops.give_timebase = mpc85xx_give_timebase;
> + smp_85xx_ops.take_timebase = mpc85xx_take_timebase;
> + }
I had this in mind:
guts = of_iomap(np, 0);
of_node_put(np);
if (guts) {
smp_85xx_ops.give_timebase = mpc85xx_give_timebase;
smp_85xx_ops.take_timebase = mpc85xx_take_timebase;
} else {
pr_err("%s: Could not map guts node address\n",
__func__);
}
That way, a missing GUTS node does not break everything.
--
Timur Tabi
Linux kernel developer at Freescale
--
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