Re: [PATCH] dw_spi: Allow interrupt sharing

From: Yong Wang
Date: Thu Sep 09 2010 - 01:27:50 EST


On Wed, Sep 08, 2010 at 10:53:41AM -0600, Grant Likely wrote:
> On Tue, Sep 07, 2010 at 03:27:27PM +0800, Yong Wang wrote:
> > Allow interrupt sharing since exclusive interrupt line for
> > DW SPI controller is not provided on every platform.
> >
> > Signed-off-by: Yong Wang <yong.y.wang@xxxxxxxxx>
> > ---
> > drivers/spi/dw_spi.c | 7 ++++++-
> > 1 files changed, 6 insertions(+), 1 deletions(-)
> >
> > diff --git a/drivers/spi/dw_spi.c b/drivers/spi/dw_spi.c
> > index d256cb0..11fbbf6 100644
> > --- a/drivers/spi/dw_spi.c
> > +++ b/drivers/spi/dw_spi.c
> > @@ -396,6 +396,11 @@ static irqreturn_t interrupt_transfer(struct dw_spi *dws)
> > static irqreturn_t dw_spi_irq(int irq, void *dev_id)
> > {
> > struct dw_spi *dws = dev_id;
> > + u16 irq_status, irq_mask = 0x3f;
> > +
> > + irq_status = dw_readw(dws, isr) & irq_mask;
> > + if (!irq_status)
> > + return IRQ_NONE;
>
> To be more concise, this could have simply been:
>
> if (!dw_readw(dws, isr) & 0x3f)
> return IRQ_NONE;
>
> ... but I'm nitpicking here. If I don't get an updated version of
> this patch from you in the next few days then I'll apply this one.
>

Thanks for your comments, Grant. Could you please apply the patch as is?
I think it is more readable. In addition, it is consistent with other
parts of the driver in terms of how isr register is manipulated.

Thanks
-Yong

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/