Message ID | 1420555701-24645-1-git-send-email-p.zabel@pengutronix.de |
---|---|
State | Superseded |
Headers | show |
From: Philipp Zabel <p.zabel@pengutronix.de> Sent: Tuesday, January 06, 2015 10:48 PM > To: Wolfram Sang > Cc: linux-i2c@vger.kernel.org; Duan Fugang-B38611; Yuan Yao-B46683; > Estevam Fabio-R49496; kernel@pengutronix.de; Philipp Zabel > Subject: [PATCH 1/3] i2c: imx: silence dma_request_slave_channel errors > if dma not set up in device tree > > If the i2c device tree nodes don't contain the dmas and dma-names > property, an error is displayed for each i2c device: > > of_dma_request_slave_channel: dma-names property of node '/soc/aips- > bus@02100000/i2c@021a0000' missing or empty > > This patch avoids calling dma_request_slave_channel if the dma-names > property does not exist in the device tree in the first place. > > Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> > --- > drivers/i2c/busses/i2c-imx.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c > index 7f3a9fe..f0d9904 100644 > --- a/drivers/i2c/busses/i2c-imx.c > +++ b/drivers/i2c/busses/i2c-imx.c > @@ -288,6 +288,9 @@ static void i2c_imx_dma_request(struct imx_i2c_struct > *i2c_imx, > struct device *dev = &i2c_imx->adapter.dev; > int ret; > > + if (!of_get_property(dev->of_node, "dma-names", NULL)) > + return; > + > dma = devm_kzalloc(dev, sizeof(*dma), GFP_KERNEL); > if (!dma) > return; > -- Acked-by: Fugang Duan <B38611@freescale.com> -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
On Tue, Jan 06, 2015 at 03:48:19PM +0100, Philipp Zabel wrote: > If the i2c device tree nodes don't contain the dmas and dma-names property, an > error is displayed for each i2c device: > > of_dma_request_slave_channel: dma-names property of node '/soc/aips-bus@02100000/i2c@021a0000' missing or empty > > This patch avoids calling dma_request_slave_channel if the dma-names property > does not exist in the device tree in the first place. > > Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Aren't you curing the symptoms instead of the cause? Sending a counterpatch in a second... > --- > drivers/i2c/busses/i2c-imx.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c > index 7f3a9fe..f0d9904 100644 > --- a/drivers/i2c/busses/i2c-imx.c > +++ b/drivers/i2c/busses/i2c-imx.c > @@ -288,6 +288,9 @@ static void i2c_imx_dma_request(struct imx_i2c_struct *i2c_imx, > struct device *dev = &i2c_imx->adapter.dev; > int ret; > > + if (!of_get_property(dev->of_node, "dma-names", NULL)) > + return; > + > dma = devm_kzalloc(dev, sizeof(*dma), GFP_KERNEL); > if (!dma) > return; > -- > 2.1.4 >
On Wed, Jan 14, 2015 at 03:14:07PM +0100, Wolfram Sang wrote: > On Tue, Jan 06, 2015 at 03:48:19PM +0100, Philipp Zabel wrote: > > If the i2c device tree nodes don't contain the dmas and dma-names property, an > > error is displayed for each i2c device: > > > > of_dma_request_slave_channel: dma-names property of node '/soc/aips-bus@02100000/i2c@021a0000' missing or empty > > > > This patch avoids calling dma_request_slave_channel if the dma-names property > > does not exist in the device tree in the first place. > > > > Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> > > Aren't you curing the symptoms instead of the cause? Sending a > counterpatch in a second... Setting to superseded because of my counterpatch fixing this in the dmaengine core. Maybe you want to ack that? :)
Am Donnerstag, den 22.01.2015, 15:33 +0100 schrieb Wolfram Sang: > On Wed, Jan 14, 2015 at 03:14:07PM +0100, Wolfram Sang wrote: > > On Tue, Jan 06, 2015 at 03:48:19PM +0100, Philipp Zabel wrote: > > > If the i2c device tree nodes don't contain the dmas and dma-names property, an > > > error is displayed for each i2c device: > > > > > > of_dma_request_slave_channel: dma-names property of node '/soc/aips-bus@02100000/i2c@021a0000' missing or empty > > > > > > This patch avoids calling dma_request_slave_channel if the dma-names property > > > does not exist in the device tree in the first place. > > > > > > Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> > > > > Aren't you curing the symptoms instead of the cause? Sending a > > counterpatch in a second... > > Setting to superseded because of my counterpatch fixing this in the > dmaengine core. Maybe you want to ack that? :) Absolutely! -- To unsubscribe from this list: send the line "unsubscribe linux-i2c" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c index 7f3a9fe..f0d9904 100644 --- a/drivers/i2c/busses/i2c-imx.c +++ b/drivers/i2c/busses/i2c-imx.c @@ -288,6 +288,9 @@ static void i2c_imx_dma_request(struct imx_i2c_struct *i2c_imx, struct device *dev = &i2c_imx->adapter.dev; int ret; + if (!of_get_property(dev->of_node, "dma-names", NULL)) + return; + dma = devm_kzalloc(dev, sizeof(*dma), GFP_KERNEL); if (!dma) return;
If the i2c device tree nodes don't contain the dmas and dma-names property, an error is displayed for each i2c device: of_dma_request_slave_channel: dma-names property of node '/soc/aips-bus@02100000/i2c@021a0000' missing or empty This patch avoids calling dma_request_slave_channel if the dma-names property does not exist in the device tree in the first place. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> --- drivers/i2c/busses/i2c-imx.c | 3 +++ 1 file changed, 3 insertions(+)