Missing coherent_dma_mask assigning triggers the following warning in
dmesg:

[    3.287872] platform lm3533-backlight.0: DMA mask not set

Since this warning might be elevated to an error in the future, set
coherent_dma_mask to zero because both the core and cells do not utilize
DMA.

Signed-off-by: Svyatoslav Ryhel <[email protected]>
---
 drivers/mfd/lm3533-core.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mfd/lm3533-core.c b/drivers/mfd/lm3533-core.c
index 131eb1a1c8eb..c7914afd564c 100644
--- a/drivers/mfd/lm3533-core.c
+++ b/drivers/mfd/lm3533-core.c
@@ -499,6 +499,10 @@ static int lm3533_i2c_probe(struct i2c_client *i2c)
                        lm3533->have_leds = true;
        }
 
+       /* Parent I2C controller uses DMA, LM3533 and child devices do not */
+       i2c->dev.coherent_dma_mask = 0;
+       i2c->dev.dma_mask = &i2c->dev.coherent_dma_mask;
+
        return lm3533_device_init(lm3533);
 }
 
-- 
2.51.0

Reply via email to