Re: [PATCH 09/20] ata: pdata_pxa: migrate over to dmaengine usage

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




On Wednesday 07 August 2013, Daniel Mack wrote:
> +       dma_cap_zero(mask);
> +       dma_cap_set(DMA_SLAVE, mask);
> +
> +       data->dma_channel =
> +               dma_request_slave_channel_compat(mask, mmp_pdma_filter_fn,
> +                                                &pdata->dma_dreq, &pdev->dev,
> +                                                "data");
> +       if (data->dma_channel == NULL)
>                 return -EBUSY;

Here and in other drivers, you hardwire the mmp_pdma_filter_fn pointer, which creates
an explicit module dependency to the dmaengine driver, which should not be there
when booting with DT.

You can avoid that by open-coding the dma_request_slave_channel_compat() function:

	data->dma_channel = dma_request_slave_channel(&pdev->dev, "data");
	if (IS_ENABLED(CONFIG_ATAGS) && !data->dma_channel && pdata)
		data->dma_channel = dma_request_channel(mask, mmp_pdma_filter_fn,
						&pdata->dma_dreq);

	Arnd
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]
  Powered by Linux