On Wed, Aug 14, 2019 at 04:49:13PM +0100, Robin Murphy wrote:
quoted
because we have to support platform_device structures that are
statically allocated.
This would be a good point to also get rid of the long-standing bodge in
platform_device_register_full().
platform_device_register_full looks odd to start with, especially
as the coumentation is rather lacking..
quoted
+static void setup_pdev_archdata(struct platform_device *pdev)
Bikeshed: painting the generic DMA API properties as "archdata" feels a bit
off-target :/
quoted
+{
+ if (!pdev->dev.coherent_dma_mask)
+ pdev->dev.coherent_dma_mask = DMA_BIT_MASK(32);
+ if (!pdev->dma_mask)
+ pdev->dma_mask = DMA_BIT_MASK(32);
+ if (!pdev->dev.dma_mask)
+ pdev->dev.dma_mask = &pdev->dma_mask;
+ arch_setup_pdev_archdata(pdev);
AFAICS m68k's implementation of that arch hook becomes entirely redundant
after this change, so may as well go. That would just leave powerpc's
actual archdata, which at a glance looks like it could probably be cleaned
up with not *too* much trouble.
Actually I think we can just kill both off. At the point archdata
is indeed entirely misnamed.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel