lkml.org 
[lkml]   [2018]   [Jul]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH v2 02/17] dmaengine: dma-jz4780: Return error if not probed from DT
    Date
    The driver calls clk_get() with the clock name set to NULL, which means
    that the driver could only work when probed from devicetree. From now
    on, we explicitly require the driver to be probed from devicetree.

    Signed-off-by: Paul Cercueil <paul@crapouillou.net>
    Tested-by: Mathieu Malaterre <malat@debian.org>
    ---
    drivers/dma/dma-jz4780.c | 5 +++++
    1 file changed, 5 insertions(+)

    v2: New patch

    diff --git a/drivers/dma/dma-jz4780.c b/drivers/dma/dma-jz4780.c
    index 85820a2d69d4..987899610b46 100644
    --- a/drivers/dma/dma-jz4780.c
    +++ b/drivers/dma/dma-jz4780.c
    @@ -761,6 +761,11 @@ static int jz4780_dma_probe(struct platform_device *pdev)
    struct resource *res;
    int i, ret;

    + if (!dev->of_node) {
    + dev_err(dev, "This driver must be probed from devicetree\n");
    + return -EINVAL;
    + }
    +
    jzdma = devm_kzalloc(dev, sizeof(*jzdma), GFP_KERNEL);
    if (!jzdma)
    return -ENOMEM;
    --
    2.11.0
    \
     
     \ /
      Last update: 2018-07-18 20:22    [W:3.912 / U:0.036 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site