diff options
author | Takashi Iwai <tiwai@suse.de> | 2019-02-01 06:14:53 -0500 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2019-02-01 11:16:40 -0500 |
commit | 0b6a2c9cf4a00f54a0916499ece8a5cf3cced385 (patch) | |
tree | 675b07d3e0b4b06c835cacdc42e3fc1ad6c801bf /Documentation/sound | |
parent | 6a8125c3cab887a236e9b1dc89a3416c50e46f56 (diff) |
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 <hch@lst.de>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'Documentation/sound')
-rw-r--r-- | Documentation/sound/kernel-api/writing-an-alsa-driver.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Documentation/sound/kernel-api/writing-an-alsa-driver.rst b/Documentation/sound/kernel-api/writing-an-alsa-driver.rst index 7c2f2032d30a..6b154dbb02cc 100644 --- a/Documentation/sound/kernel-api/writing-an-alsa-driver.rst +++ b/Documentation/sound/kernel-api/writing-an-alsa-driver.rst | |||
@@ -3520,14 +3520,14 @@ allocator will try to get an area as large as possible within the | |||
3520 | given size. | 3520 | given size. |
3521 | 3521 | ||
3522 | The second argument (type) and the third argument (device pointer) are | 3522 | The second argument (type) and the third argument (device pointer) are |
3523 | dependent on the bus. In the case of the ISA bus, pass | 3523 | dependent on the bus. For normal devices, pass the device pointer |
3524 | :c:func:`snd_dma_isa_data()` as the third argument with | 3524 | (typically identical as ``card->dev``) to the third argument with |
3525 | ``SNDRV_DMA_TYPE_DEV`` type. For the continuous buffer unrelated to the | 3525 | ``SNDRV_DMA_TYPE_DEV`` type. For the continuous buffer unrelated to the |
3526 | bus can be pre-allocated with ``SNDRV_DMA_TYPE_CONTINUOUS`` type and the | 3526 | bus can be pre-allocated with ``SNDRV_DMA_TYPE_CONTINUOUS`` type and the |
3527 | ``snd_dma_continuous_data(GFP_KERNEL)`` device pointer, where | 3527 | ``snd_dma_continuous_data(GFP_KERNEL)`` device pointer, where |
3528 | ``GFP_KERNEL`` is the kernel allocation flag to use. For the PCI | 3528 | ``GFP_KERNEL`` is the kernel allocation flag to use. For the |
3529 | scatter-gather buffers, use ``SNDRV_DMA_TYPE_DEV_SG`` with | 3529 | scatter-gather buffers, use ``SNDRV_DMA_TYPE_DEV_SG`` with the device |
3530 | ``snd_dma_pci_data(pci)`` (see the `Non-Contiguous Buffers`_ | 3530 | pointer (see the `Non-Contiguous Buffers`_ |
3531 | section). | 3531 | section). |
3532 | 3532 | ||
3533 | Once the buffer is pre-allocated, you can use the allocator in the | 3533 | Once the buffer is pre-allocated, you can use the allocator in the |