public inbox for linux-serial@vger.kernel.org
 help / color / mirror / Atom feed
From: Shreshtha Kumar SAHU <shreshthakumar.sahu@stericsson.com>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: "gregkh@suse.de" <gregkh@suse.de>,
	"linux-serial@vger.kernel.org" <linux-serial@vger.kernel.org>,
	"rmk+kernel@arm.linux.org.uk" <rmk+kernel@arm.linux.org.uk>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] amba-pl011: clear previous interrupts before request_irq
Date: Thu, 19 Jan 2012 16:45:58 +0530	[thread overview]
Message-ID: <20120119111558.GB6115@bnru02.bnr.st.com> (raw)
In-Reply-To: <20120118114100.064e2c8f@pyramind.ukuu.org.uk>

On Wed, Jan 18, 2012 at 12:41:00 +0100, Alan Cox wrote:
> >  	/*
> > +	 * Clear previous interrupts before installing interrupt handler
> > +	 */
> > +	spin_lock_irq(&uap->port.lock);
> > +	uap->im = 0;
> > +	writew(uap->im, uap->port.membase + UART011_IMSC);
> > +	writew(0xffff, uap->port.membase + UART011_ICR);
> > +	spin_unlock_irq(&uap->port.lock);
> 
> I'm confused why you use spin_lock_irq before you've enabled the IRQ in
> the first place but looks fine.
> 
> Alan
Yes, spin_lock_irq for the port is not required as request_irq is not yet
called for the port.

Thanks and Regards,
Shreshtha

      reply	other threads:[~2012-01-19 11:16 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-17 10:34 [PATCH] amba-pl011: clear previous interrupts before request_irq Shreshtha Kumar SAHU
2012-01-18 10:04 ` Shreshtha Kumar SAHU
2012-01-18 10:15   ` Russell King
2012-01-19 11:07     ` Shreshtha Kumar SAHU
2012-01-18 11:41   ` Alan Cox
2012-01-19 11:15     ` Shreshtha Kumar SAHU [this message]

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=20120119111558.GB6115@bnru02.bnr.st.com \
    --to=shreshthakumar.sahu@stericsson.com \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=gregkh@suse.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-serial@vger.kernel.org \
    --cc=rmk+kernel@arm.linux.org.uk \
    /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