All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/3] i2c: imx: silence dma_request_slave_channel errors if dma not set up in device tree
@ 2015-01-06 14:48 Philipp Zabel
       [not found] ` <1420555701-24645-1-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  0 siblings, 1 reply; 14+ messages in thread
From: Philipp Zabel @ 2015-01-06 14:48 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-i2c-u79uwXL29TY76Z2rM5mHXA, Fugang Duan, Yao Yuan,
	Fabio Estevam, kernel-bIcnvbaLZ9MEGnE8C9+IrQ, Philipp Zabel

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-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
---
 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

^ permalink raw reply related	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2015-01-22 14:48 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-06 14:48 [PATCH 1/3] i2c: imx: silence dma_request_slave_channel errors if dma not set up in device tree Philipp Zabel
     [not found] ` <1420555701-24645-1-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-01-06 14:48   ` [PATCH 2/3] i2c: imx: remove unused return value assignments Philipp Zabel
     [not found]     ` <1420555701-24645-2-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-01-07  2:51       ` fugang.duan-KZfg59tc24xl57MIdRCFDg
2015-01-14 14:20       ` Wolfram Sang
2015-01-06 14:48   ` [PATCH 3/3] i2c: imx: whitespace and checkpatch cleanup Philipp Zabel
     [not found]     ` <1420555701-24645-3-git-send-email-p.zabel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-01-07  2:36       ` fugang.duan-KZfg59tc24xl57MIdRCFDg
     [not found]         ` <BLUPR03MB3730EFCF20035ADB0027ABAF5460-GeMU99GfrrsHjcGqcGfFzOO6mTEJWrR4XA4E9RH9d+qIuWR1G4zioA@public.gmane.org>
2015-01-07 11:01           ` Philipp Zabel
     [not found]             ` <1420628513.3191.30.camel-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-01-07 11:13               ` fugang.duan-KZfg59tc24xl57MIdRCFDg
2015-01-14 14:25       ` Wolfram Sang
2015-01-14 14:48         ` Philipp Zabel
2015-01-07  2:31   ` [PATCH 1/3] i2c: imx: silence dma_request_slave_channel errors if dma not set up in device tree fugang.duan-KZfg59tc24xl57MIdRCFDg
2015-01-14 14:14   ` Wolfram Sang
2015-01-22 14:33     ` Wolfram Sang
2015-01-22 14:48       ` Philipp Zabel

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.