ALSA: isa: Avoid passing NULL to memory allocators

We used to pass NULL to memory allocators for ISA devices due to
historical reasons.  But we prefer rather a proper device object to be
assigned, so let's fix it by replacing snd_dma_isa_data() call with
card->dev reference, and kill snd_dma_isa_data() definition.

Reviewed-by: Christoph Hellwig <[email protected]>
Signed-off-by: Takashi Iwai <[email protected]>
This commit is contained in:
Takashi Iwai 2019-02-01 12:14:53 +01:00
commit 0b6a2c9cf4
11 changed files with 18 additions and 18 deletions

View file

@ -3520,14 +3520,14 @@ allocator will try to get an area as large as possible within the
given size.
The second argument (type) and the third argument (device pointer) are
dependent on the bus. In the case of the ISA bus, pass
:c:func:`snd_dma_isa_data()` as the third argument with
dependent on the bus. For normal devices, pass the device pointer
(typically identical as ``card->dev``) to the third argument with
``SNDRV_DMA_TYPE_DEV`` type. For the continuous buffer unrelated to the
bus can be pre-allocated with ``SNDRV_DMA_TYPE_CONTINUOUS`` type and the
``snd_dma_continuous_data(GFP_KERNEL)`` device pointer, where
``GFP_KERNEL`` is the kernel allocation flag to use. For the PCI
scatter-gather buffers, use ``SNDRV_DMA_TYPE_DEV_SG`` with
``snd_dma_pci_data(pci)`` (see the `Non-Contiguous Buffers`_
``GFP_KERNEL`` is the kernel allocation flag to use. For the
scatter-gather buffers, use ``SNDRV_DMA_TYPE_DEV_SG`` with the device
pointer (see the `Non-Contiguous Buffers`_
section).
Once the buffer is pre-allocated, you can use the allocator in the