linux-mips
[Top] [All Lists]

Re: [PATCH 2/2] i2c-au1550: convert to platform driver

To: Domen Puncer <domen.puncer@telargo.com>
Subject: Re: [PATCH 2/2] i2c-au1550: convert to platform driver
From: Jean Delvare <khali@linux-fr.org>
Date: Fri, 18 May 2007 14:38:39 +0200
Cc: Manuel Lauss <mano@roarinelk.homelinux.net>, i2c@lm-sensors.org, linux-mips@linux-mips.org
In-reply-to: <20070518072427.GC20713@moe.telargo.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20070516053439.GB12986@roarinelk.homelinux.net> <20070517123853.4ae91d25@hyperion.delvare> <20070518072427.GC20713@moe.telargo.com>
Sender: linux-mips-bounce@linux-mips.org
Hi Domen,

On Fri, 18 May 2007 09:24:27 +0200, Domen Puncer wrote:
> On 17/05/07 12:38 +0200, Jean Delvare wrote:
> > On Wed, 16 May 2007 07:34:40 +0200, Manuel Lauss wrote:
> > >   if (!(stat & PSC_SMBSTAT_TE) || !(stat & PSC_SMBSTAT_RE)) {
> > > -         sp->psc_smbpcr = PSC_SMBPCR_DC;
> > > +         au_writel(PSC_SMBPCR_DC, base + PSC_SMBPCR);
> > >           au_sync();
> > > -         do {
> > > -                 stat = sp->psc_smbpcr;
> > > -                 au_sync();
> > > -         } while ((stat & PSC_SMBPCR_DC) != 0);
> > > +         while (au_readl(base + PSC_SMBPCR) & PSC_SMBPCR_DC)
> > > +                 msleep(0);
> > 
> > You are changing the behavior here, while this patch is supposed to
> > only convert the driver to the new device driver model.
> 
> Well... since msleep(0) is nothing, it's the same, but it does
> look weird.

msleep(0) isn't nothing. It sleeps until the next tick.

-- 
Jean Delvare

<Prev in Thread] Current Thread [Next in Thread>