[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b1778af62e7b42b39381fb2699b34eb1@BL2PR03MB338.namprd03.prod.outlook.com>
Date: Wed, 23 Jul 2014 11:11:53 +0000
From: Yao Yuan <yao.yuan@...escale.com>
To: Lothar Waßmann <LW@...O-electronics.de>
CC: "wsa@...-dreams.de" <wsa@...-dreams.de>,
"marex@...x.de" <marex@...x.de>,
"mark.rutland@....com" <mark.rutland@....com>,
"shawn.guo@...aro.org" <shawn.guo@...aro.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"linux-arm-kernel@...ts.infradead.org"
<linux-arm-kernel@...ts.infradead.org>,
"linux-i2c@...r.kernel.org" <linux-i2c@...r.kernel.org>
Subject: RE: [PATCH v5 1/2] i2c: add DMA support for freescale i2c driver
Hi,
Thanks for your review.
Lothar Waßmann wrote:
> Yuan Yao wrote:
> > Add dma support for i2c. This function depend on DMA driver.
> > You can turn on it by write both the dmas and dma-name properties in dts node.
> >
> > Signed-off-by: Yuan Yao <yao.yuan@...escale.com>
> > ---
> > drivers/i2c/busses/i2c-imx.c | 377
[...]
> > +
> > +fail_rx:
> > + dma_release_channel(dma->chan_rx);
> > +fail_tx:
> > + dma_release_channel(dma->chan_tx);
> > +fail_al:
> > + devm_kfree(dev, dma);
> >
> No need for this one (that's the whole point of using devm_kzalloc())!
>
When DMA request failed, I2C will switch to PIO mode. So if the failed reason is just like DMA channel request failed. At this time the DMA should free by devm_kfree(). Is it?
[...]
Thanks.
Yuan Yao
Powered by blists - more mailing lists