mirror of
https://github.com/torvalds/linux.git
synced 2026-11-07 06:17:02 +01:00
mfd: wcd934x: set DMA mask on parent to silence "DMA mask not set"
The wcd934x MFD parent (a slim_device) never initializes its
dma_mask/coherent_dma_mask. When the DT-aware children pass through
of_dma_configure() this triggers the "DMA mask not set" warning for
each child.
Cc: stable@vger.kernel.org
Fixes: f959dcd6dd ("dma-direct: Fix potential NULL pointer dereference")
Assisted-by: tencent:hy3
Signed-off-by: David Heidelberg <david@ixit.cz>
Link: https://patch.msgid.link/20260903-wcd-dma-v2-1-189cff560a28@ixit.cz
Signed-off-by: Lee Jones <lee@kernel.org>
This commit is contained in:
parent
fdb122928a
commit
b296be1dc0
|
|
@ -2,6 +2,7 @@
|
|||
// Copyright (c) 2019, Linaro Limited
|
||||
|
||||
#include <linux/clk.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
#include <linux/gpio/consumer.h>
|
||||
#include <linux/interrupt.h>
|
||||
#include <linux/kernel.h>
|
||||
|
|
@ -217,6 +218,11 @@ static int wcd934x_slim_probe(struct slim_device *sdev)
|
|||
struct gpio_desc *reset_gpio;
|
||||
int ret;
|
||||
|
||||
ret = dma_coerce_mask_and_coherent(dev, DMA_BIT_MASK(32));
|
||||
if (ret)
|
||||
return dev_err_probe(dev, ret,
|
||||
"Failed to set DMA mask\n");
|
||||
|
||||
ddata = devm_kzalloc(dev, sizeof(*ddata), GFP_KERNEL);
|
||||
if (!ddata)
|
||||
return -ENOMEM;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user