aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/trident/trident.h
diff options
context:
space:
mode:
authorGravatar Takashi Iwai <tiwai@suse.de> 2021-07-15 09:59:10 +0200
committerGravatar Takashi Iwai <tiwai@suse.de> 2021-07-19 16:17:08 +0200
commit5adfd8c26607cdc666aa86ecc10104924d54082a (patch)
tree437cc8f28dedb345f10b9d60d1d04c96facd7936 /sound/pci/trident/trident.h
parentALSA: rme9652: Allocate resources with device-managed APIs (diff)
downloadlinux-5adfd8c26607cdc666aa86ecc10104924d54082a.tar.gz
linux-5adfd8c26607cdc666aa86ecc10104924d54082a.tar.bz2
linux-5adfd8c26607cdc666aa86ecc10104924d54082a.zip
ALSA: trident: Allocate resources with device-managed APIs
This patch converts the resource management in PCI trident driver with devres as a clean up. Each manual resource management is converted with the corresponding devres helper, the page allocations are done with the devres helper, and the card object release is managed now via card->private_free instead of a lowlevel snd_device. This should give no user-visible functional changes. Link: https://lore.kernel.org/r/20210715075941.23332-49-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/trident/trident.h')
-rw-r--r--sound/pci/trident/trident.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/sound/pci/trident/trident.h b/sound/pci/trident/trident.h
index c579a44bb9ae..9768a7fc2349 100644
--- a/sound/pci/trident/trident.h
+++ b/sound/pci/trident/trident.h
@@ -251,9 +251,9 @@ struct snd_trident_memblk_arg {
struct snd_trident_tlb {
__le32 *entries; /* 16k-aligned TLB table */
dma_addr_t entries_dmaaddr; /* 16k-aligned PCI address to TLB table */
- struct snd_dma_buffer buffer;
+ struct snd_dma_buffer *buffer;
struct snd_util_memhdr * memhdr; /* page allocation list */
- struct snd_dma_buffer silent_page;
+ struct snd_dma_buffer *silent_page;
};
struct snd_trident_voice {
@@ -400,8 +400,7 @@ int snd_trident_create(struct snd_card *card,
struct pci_dev *pci,
int pcm_streams,
int pcm_spdif_device,
- int max_wavetable_size,
- struct snd_trident ** rtrident);
+ int max_wavetable_size);
int snd_trident_create_gameport(struct snd_trident *trident);
int snd_trident_pcm(struct snd_trident *trident, int device);