mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-25 08:02:56 +00:00
driver core: initialize a default DMA mask for platform device
We still treat devices without a DMA mask as defaulting to 32-bits for both mask, but a few releases ago we've started warning about such cases, as they require special cases to work around this sloppyness. Add a dma_mask field to struct platform_device so that we can initialize the dma_mask pointer in struct device and initialize both masks to 32-bits by default, replacing similar functionality in m68k and powerpc. The arch_setup_pdev_archdata hooks is now unused and removed. Note that the code looks a little odd with the various conditionals because we have to support platform_device structures that are statically allocated. Signed-off-by: Christoph Hellwig <hch@lst.de> Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/r/20190816062435.881-7-hch@lst.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
bd5defaee8
commit
cdfee56232
9 changed files with 17 additions and 44 deletions
|
@ -778,12 +778,6 @@ void ppc_printk_progress(char *s, unsigned short hex)
|
|||
pr_info("%s\n", s);
|
||||
}
|
||||
|
||||
void arch_setup_pdev_archdata(struct platform_device *pdev)
|
||||
{
|
||||
pdev->archdata.dma_mask = DMA_BIT_MASK(32);
|
||||
pdev->dev.dma_mask = &pdev->archdata.dma_mask;
|
||||
}
|
||||
|
||||
static __init void print_system_info(void)
|
||||
{
|
||||
pr_info("-----------------------------------------------------\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue