From: shawn.guo@freescale.com (Shawn Guo)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/2] ARM: i.MX system: Simplify handling watchdog clock
Date: Fri, 20 Jun 2014 15:50:34 +0800 [thread overview]
Message-ID: <20140620075031.GC28225@dragon> (raw)
In-Reply-To: <1403239006.737527842@f277.i.mail.ru>
On Fri, Jun 20, 2014 at 08:36:46AM +0400, Alexander Shiyan wrote:
> Fri, 20 Jun 2014 12:26:52 +0800 ?? Shawn Guo <shawn.guo@freescale.com>:
> > On Fri, Jun 13, 2014 at 11:26:12AM +0400, Alexander Shiyan wrote:
> > > This patch simplifies handling watchdog clock a bit.
> > > As an additional change, now we properly check WDT clock in a reset
> > > function.
> > >
> > > Signed-off-by: Alexander Shiyan <shc_work@mail.ru>
> > > ---
> > > arch/arm/mach-imx/system.c | 20 +++++++-------------
> > > 1 file changed, 7 insertions(+), 13 deletions(-)
> > >
> > > diff --git a/arch/arm/mach-imx/system.c b/arch/arm/mach-imx/system.c
> > > index 3b0733e..ae521f3 100644
> > > --- a/arch/arm/mach-imx/system.c
> > > +++ b/arch/arm/mach-imx/system.c
> > > @@ -42,7 +42,7 @@ void mxc_restart(enum reboot_mode mode, const char *cmd)
> > > {
> > > unsigned int wcr_enable;
> > >
> > > - if (wdog_clk)
> > > + if (!IS_ERR_OR_NULL(wdog_clk))
> >
> > I think this should just be if (!IS_ERR(wdog_clk)).
>
> No, this is a part of commit log.
> wdog_clk can be NULL if mxc_arch_reset_init() is not called,
> so we just protect mxc_restart() for such cases.
I think clk API can take NULL as input.
Shawn
next prev parent reply other threads:[~2014-06-20 7:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-13 7:26 [PATCH 1/2] ARM: i.MX system: Simplify handling watchdog clock Alexander Shiyan
2014-06-13 7:26 ` [PATCH 2/2] ARM: i.MX system: Add a reset fallback if base address of watchdog is not set Alexander Shiyan
2014-06-20 4:26 ` [PATCH 1/2] ARM: i.MX system: Simplify handling watchdog clock Shawn Guo
2014-06-20 4:36 ` Alexander Shiyan
2014-06-20 7:50 ` Shawn Guo [this message]
2014-06-20 7:57 ` Alexander Shiyan
2014-06-20 8:52 ` Shawn Guo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140620075031.GC28225@dragon \
--to=shawn.guo@freescale.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).