[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20170928081310.GA30097@localhost>
Date: Thu, 28 Sep 2017 13:43:11 +0530
From: Vinod Koul <vinod.koul@...el.com>
To: Pierre-Yves MORDRET <pierre-yves.mordret@...com>
Cc: Rob Herring <robh+dt@...nel.org>,
Mark Rutland <mark.rutland@....com>,
Maxime Coquelin <mcoquelin.stm32@...il.com>,
Alexandre Torgue <alexandre.torgue@...com>,
Russell King <linux@...linux.org.uk>,
Dan Williams <dan.j.williams@...el.com>,
M'boumba Cedric Madianga <cedric.madianga@...il.com>,
Fabrice GASNIER <fabrice.gasnier@...com>,
Herbert Xu <herbert@...dor.apana.org.au>,
Fabien DESSENNE <fabien.dessenne@...com>,
Amelie Delaunay <amelie.delaunay@...com>,
dmaengine@...r.kernel.org, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH v4 2/4] dmaengine: Add STM32 MDMA driver
On Fri, Aug 25, 2017 at 04:31:04PM +0200, Pierre-Yves MORDRET wrote:
> +static int stm32_mdma_probe(struct platform_device *pdev)
> +{
[snip]
> + dmadev = devm_kzalloc(&pdev->dev, sizeof(*dmadev) + sizeof(u32) * count,
> + GFP_KERNEL);
> + if (!dmadev)
> + return -ENOMEM;
> +
> + dmadev->nr_channels = nr_channels;
> + dmadev->nr_requests = nr_requests;
> + device_property_read_u32_array(&pdev->dev, "st,ahb-addr-masks",
> + dmadev->ahb_addr_masks,
> + count);
> + dmadev->nr_ahb_addr_masks = count;
> +
> + res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
> + dmadev->base = devm_ioremap_resource(&pdev->dev, res);
> + if (IS_ERR(dmadev->base))
> + return PTR_ERR(dmadev->base);
> +
> + dmadev->clk = devm_clk_get(&pdev->dev, NULL);
> + if (IS_ERR(dmadev->clk)) {
> + dev_err(&pdev->dev, "Error: Missing controller clock\n");
> + return PTR_ERR(dmadev->clk);
> + }
I am assuming if clk is not availble at this point of time you return clk
error which maybe defer probe, right?
> +static struct platform_driver stm32_mdma_driver = {
> + .driver = {
> + .name = "stm32-mdma",
> + .of_match_table = stm32_mdma_of_match,
> + },
> +};
> +
> +static int __init stm32_mdma_init(void)
> +{
> + return platform_driver_probe(&stm32_mdma_driver, stm32_mdma_probe);
and you register platform_driver_probe() which per
drivers/base/platform.c:760 is incompatible with defer probing.
So this need a fix
--
~Vinod
Powered by blists - more mailing lists