From mboxrd@z Thu Jan 1 00:00:00 1970 From: "ABRAHAM, KISHON VIJAY" Subject: Re: [PATCHv11 3/6] i2c: omap: Do not initialise the completion everytime Date: Thu, 28 Jun 2012 21:33:11 +0530 Message-ID: References: <1340896292-12112-1-git-send-email-shubhrajyoti@ti.com> <1340896292-12112-4-git-send-email-shubhrajyoti@ti.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: QUOTED-PRINTABLE Return-path: In-Reply-To: <1340896292-12112-4-git-send-email-shubhrajyoti-l0cyMroinI0@public.gmane.org> Sender: linux-i2c-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Shubhrajyoti D Cc: linux-omap-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-i2c-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org, ben-linux-elnMNo+KYs3YtjvyW6yDsg@public.gmane.org, tony-4v6yS6AI5VpBDgjK7y7TUQ@public.gmane.org, w.sang-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org List-Id: linux-i2c@vger.kernel.org Hi, On Thu, Jun 28, 2012 at 8:41 PM, Shubhrajyoti D w= rote: > Use INIT_COMPLETION instead of init_completion in transfer. > > Reviewed-by: Felipe Balbi > Signed-off-by: Shubhrajyoti D > --- > - Add Felipe's reviewed-by tag > > =A0drivers/i2c/busses/i2c-omap.c | =A0 =A03 ++- > =A01 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-o= map.c > index b9915bb..6d05f18 100644 > --- a/drivers/i2c/busses/i2c-omap.c > +++ b/drivers/i2c/busses/i2c-omap.c > @@ -490,7 +490,7 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *= adap, > =A0 =A0 =A0 =A0w |=3D OMAP_I2C_BUF_RXFIF_CLR | OMAP_I2C_BUF_TXFIF_CLR= ; > =A0 =A0 =A0 =A0omap_i2c_write_reg(dev, OMAP_I2C_BUF_REG, w); > > - =A0 =A0 =A0 init_completion(&dev->cmd_complete); > + =A0 =A0 =A0 INIT_COMPLETION(dev->cmd_complete); > =A0 =A0 =A0 =A0dev->cmd_err =3D 0; > > =A0 =A0 =A0 =A0w =3D OMAP_I2C_CON_EN | OMAP_I2C_CON_MST | OMAP_I2C_CO= N_STT; > @@ -999,6 +999,7 @@ omap_i2c_probe(struct platform_device *pdev) > =A0 =A0 =A0 =A0} > > =A0 =A0 =A0 =A0platform_set_drvdata(pdev, dev); > + =A0 =A0 =A0 init_completion(&dev->cmd_complete); It should be INIT_COMPLETION here too. Thanks Kishon From mboxrd@z Thu Jan 1 00:00:00 1970 From: kishon@ti.com (ABRAHAM, KISHON VIJAY) Date: Thu, 28 Jun 2012 21:33:11 +0530 Subject: [PATCHv11 3/6] i2c: omap: Do not initialise the completion everytime In-Reply-To: <1340896292-12112-4-git-send-email-shubhrajyoti@ti.com> References: <1340896292-12112-1-git-send-email-shubhrajyoti@ti.com> <1340896292-12112-4-git-send-email-shubhrajyoti@ti.com> Message-ID: To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi, On Thu, Jun 28, 2012 at 8:41 PM, Shubhrajyoti D wrote: > Use INIT_COMPLETION instead of init_completion in transfer. > > Reviewed-by: Felipe Balbi > Signed-off-by: Shubhrajyoti D > --- > - Add Felipe's reviewed-by tag > > ?drivers/i2c/busses/i2c-omap.c | ? ?3 ++- > ?1 files changed, 2 insertions(+), 1 deletions(-) > > diff --git a/drivers/i2c/busses/i2c-omap.c b/drivers/i2c/busses/i2c-omap.c > index b9915bb..6d05f18 100644 > --- a/drivers/i2c/busses/i2c-omap.c > +++ b/drivers/i2c/busses/i2c-omap.c > @@ -490,7 +490,7 @@ static int omap_i2c_xfer_msg(struct i2c_adapter *adap, > ? ? ? ?w |= OMAP_I2C_BUF_RXFIF_CLR | OMAP_I2C_BUF_TXFIF_CLR; > ? ? ? ?omap_i2c_write_reg(dev, OMAP_I2C_BUF_REG, w); > > - ? ? ? init_completion(&dev->cmd_complete); > + ? ? ? INIT_COMPLETION(dev->cmd_complete); > ? ? ? ?dev->cmd_err = 0; > > ? ? ? ?w = OMAP_I2C_CON_EN | OMAP_I2C_CON_MST | OMAP_I2C_CON_STT; > @@ -999,6 +999,7 @@ omap_i2c_probe(struct platform_device *pdev) > ? ? ? ?} > > ? ? ? ?platform_set_drvdata(pdev, dev); > + ? ? ? init_completion(&dev->cmd_complete); It should be INIT_COMPLETION here too. Thanks Kishon