sparc64: refactor the ali DMA quirk

Do the quirk first in the dma_supported routines, as we don't need
any of the other checks for it, and remove the duplicate mask checking
that is already done by the callers.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Acked-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Christoph Hellwig
2019-02-15 09:06:31 +01:00
parent 7753a91e78
commit c54fc984da
4 changed files with 27 additions and 37 deletions

View File

@@ -45,7 +45,11 @@ void __irq_entry smp_receive_signal_client(int irq, struct pt_regs *regs);
void __irq_entry smp_kgdb_capture_client(int irq, struct pt_regs *regs);
/* pci.c */
int pci64_dma_supported(struct pci_dev *pdev, u64 device_mask);
#ifdef CONFIG_PCI
int ali_sound_dma_hack(struct device *dev, u64 device_mask);
#else
#define ali_sound_dma_hack(dev, mask) (0)
#endif
/* signal32.c */
void do_sigreturn32(struct pt_regs *regs);