aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ymfpci/ymfpci.h
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2021-07-15 09:59:13 +0200
committerTakashi Iwai <tiwai@suse.de>2021-07-19 16:17:11 +0200
commitc6e6bb5eab7457a938c0405d5ccf319d3ee735c1 (patch)
tree2c3dd071eed8c87cabe4153ac5f4c3c44e333ac6 /sound/pci/ymfpci/ymfpci.h
parentALSA: vx222: Allocate resources with device-managed APIs (diff)
downloadlinux-dev-c6e6bb5eab7457a938c0405d5ccf319d3ee735c1.tar.xz
linux-dev-c6e6bb5eab7457a938c0405d5ccf319d3ee735c1.zip
ALSA: ymfpci: Allocate resources with device-managed APIs
This patch converts the resource management in PCI ymfpci 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-52-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/ymfpci/ymfpci.h')
-rw-r--r--sound/pci/ymfpci/ymfpci.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/sound/pci/ymfpci/ymfpci.h b/sound/pci/ymfpci/ymfpci.h
index c73d8a5f4d0b..66968776478a 100644
--- a/sound/pci/ymfpci/ymfpci.h
+++ b/sound/pci/ymfpci/ymfpci.h
@@ -275,16 +275,13 @@ struct snd_ymfpci {
unsigned char rev; /* PCI revision */
unsigned long reg_area_phys;
void __iomem *reg_area_virt;
- struct resource *res_reg_area;
- struct resource *fm_res;
- struct resource *mpu_res;
unsigned short old_legacy_ctrl;
#ifdef SUPPORT_JOYSTICK
struct gameport *gameport;
#endif
- struct snd_dma_buffer work_ptr;
+ struct snd_dma_buffer *work_ptr;
unsigned int bank_size_playback;
unsigned int bank_size_capture;
@@ -358,8 +355,7 @@ struct snd_ymfpci {
int snd_ymfpci_create(struct snd_card *card,
struct pci_dev *pci,
- unsigned short old_legacy_ctrl,
- struct snd_ymfpci ** rcodec);
+ unsigned short old_legacy_ctrl);
void snd_ymfpci_free_gameport(struct snd_ymfpci *chip);
extern const struct dev_pm_ops snd_ymfpci_pm;