On architectures that don't support the ISA DMA API, this causes a build
failure. The corresponding dma_alloc() call is already in an #ifdef,
so use the same one for dma_free().
Note that nothing seems to set PC2_DMA, so parts of this driver
are likely unused. ISA DMA usually does not work on PCI or PCMCIA
devices, only on physical ISA slots.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Link: https://lore.kernel.org/r/20241016111521.1143191-4-arnd@kernel.org
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
if (pc2_priv) {
nec_priv = &pc2_priv->nec7210_priv;
+#ifdef PC2_DMA
if (nec_priv->dma_channel)
free_dma(nec_priv->dma_channel);
+#endif
gpib_free_pseudo_irq(board);
if (pc2_priv->irq)
free_irq(pc2_priv->irq, board);
if (pc2_priv) {
nec_priv = &pc2_priv->nec7210_priv;
+#ifdef PC2_DMA
if (nec_priv->dma_channel)
free_dma(nec_priv->dma_channel);
+#endif
gpib_free_pseudo_irq(board);
if (pc2_priv->irq)
free_irq(pc2_priv->irq, board);