ALSA: pci: Avoid non-standard macro usage
authorTakashi Iwai <tiwai@suse.de>
Tue, 5 Nov 2019 15:18:55 +0000 (16:18 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 6 Nov 2019 14:47:43 +0000 (15:47 +0100)
Pass the device pointer from the PCI pointer directly, instead of a
non-standard macro.  The macro didn't give any better readability.

Link: https://lore.kernel.org/r/20191105151856.10785-24-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
46 files changed:
sound/pci/ad1889.c
sound/pci/ali5451/ali5451.c
sound/pci/als300.c
sound/pci/als4000.c
sound/pci/asihpi/asihpi.c
sound/pci/atiixp.c
sound/pci/atiixp_modem.c
sound/pci/au88x0/au88x0_pcm.c
sound/pci/aw2/aw2-alsa.c
sound/pci/azt3328.c
sound/pci/bt87x.c
sound/pci/ca0106/ca0106_main.c
sound/pci/cmipci.c
sound/pci/cs4281.c
sound/pci/cs46xx/cs46xx_lib.c
sound/pci/cs5535audio/cs5535audio_pcm.c
sound/pci/ctxfi/ctpcm.c
sound/pci/ctxfi/ctvmem.c
sound/pci/emu10k1/emu10k1.c
sound/pci/emu10k1/emu10k1x.c
sound/pci/emu10k1/emufx.c
sound/pci/emu10k1/emupcm.c
sound/pci/emu10k1/memory.c
sound/pci/emu10k1/p16v.c
sound/pci/ens1370.c
sound/pci/es1938.c
sound/pci/fm801.c
sound/pci/ice1712/ice1712.c
sound/pci/ice1712/ice1724.c
sound/pci/intel8x0.c
sound/pci/intel8x0m.c
sound/pci/korg1212/korg1212.c
sound/pci/lola/lola.c
sound/pci/lola/lola_pcm.c
sound/pci/lx6464es/lx6464es.c
sound/pci/maestro3.c
sound/pci/mixart/mixart.c
sound/pci/oxygen/oxygen_pcm.c
sound/pci/pcxhr/pcxhr.c
sound/pci/riptide/riptide.c
sound/pci/sis7019.c
sound/pci/sonicvibes.c
sound/pci/trident/trident_main.c
sound/pci/via82xx.c
sound/pci/via82xx_modem.c
sound/pci/ymfpci/ymfpci_main.c

index 4b2451287e2c410fb4bff4a3d002f10885a24d7d..5b6452df8bbd05f15087ad54c6d82d66f4fa9d12 100644 (file)
@@ -633,9 +633,9 @@ snd_ad1889_pcm_init(struct snd_ad1889 *chip, int device)
        chip->csubs = NULL;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                               snd_dma_pci_data(chip->pci),
-                                               BUFFER_BYTES_MAX / 2,
-                                               BUFFER_BYTES_MAX);
+                                             &chip->pci->dev,
+                                             BUFFER_BYTES_MAX / 2,
+                                             BUFFER_BYTES_MAX);
 
        return 0;
 }
index 6e28e381c21ac58295d58fd0ed6f9a921c0950ab..ae29df085ae14b2c4ddfd65af87b5fa9eefba15a 100644 (file)
@@ -1672,7 +1672,7 @@ static int snd_ali_pcm(struct snd_ali *codec, int device,
                                desc->capture_ops);
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(codec->pci),
+                                             &codec->pci->dev,
                                              64*1024, 128*1024);
 
        pcm->info_flags = 0;
index 530799c8d3ce8025adb5d60a01105e593965ead9..cfbb8cacaaacb2e46572e8bd6f710f83afba24aa 100644 (file)
@@ -592,7 +592,8 @@ static int snd_als300_new_pcm(struct snd_als300 *chip)
 
        /* pre-allocation of buffers */
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-       snd_dma_pci_data(chip->pci), 64*1024, 64*1024);
+                                             &chip->pci->dev,
+                                             64*1024, 64*1024);
        return 0;
 }
 
index b06c3dbb525d29abdbb7b7cf35a9fc3f1c92a9c8..d6f5487afe52cc224fe36d2da83d8725b47be9a7 100644 (file)
@@ -693,7 +693,8 @@ static int snd_als4000_pcm(struct snd_sb *chip, int device)
        snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_PLAYBACK, &snd_als4000_playback_ops);
        snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_als4000_capture_ops);
 
-       snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci),
+       snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
+                                             &chip->pci->dev,
                                              64*1024, 64*1024);
 
        chip->pcm = pcm;
index 2a21a3d997196283f3107929fa1f6847e10724f8..147005fdd3eac899e54dd880f79427345f0e8d24 100644 (file)
@@ -1325,8 +1325,8 @@ static int snd_card_asihpi_pcm_new(struct snd_card_asihpi *asihpi, int device)
        /*? do we want to emulate MMAP for non-BBM cards?
        Jack doesn't work with ALSAs MMAP emulation - WHY NOT? */
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                               snd_dma_pci_data(asihpi->pci),
-                                               64*1024, BUFFER_BYTES_MAX);
+                                             &asihpi->pci->dev,
+                                             64*1024, BUFFER_BYTES_MAX);
 
        return 0;
 }
index c953bd73a48cf6aefcca3c7efccc5dc5b73a84ab..1e1ededf8eb241caa47ab402ff7293c712c16446 100644 (file)
@@ -353,7 +353,7 @@ static int atiixp_build_dma_packets(struct atiixp *chip, struct atiixp_dma *dma,
 
        if (dma->desc_buf.area == NULL) {
                if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV,
-                                       snd_dma_pci_data(chip->pci),
+                                       &chip->pci->dev,
                                        ATI_DESC_LIST_SIZE,
                                        &dma->desc_buf) < 0)
                        return -ENOMEM;
@@ -1284,7 +1284,7 @@ static int snd_atiixp_pcm_new(struct atiixp *chip)
        chip->pcmdevs[ATI_PCMDEV_ANALOG] = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->pci),
+                                             &chip->pci->dev,
                                              64*1024, 128*1024);
 
        err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK,
@@ -1317,7 +1317,7 @@ static int snd_atiixp_pcm_new(struct atiixp *chip)
        chip->pcmdevs[ATI_PCMDEV_DIGITAL] = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->pci),
+                                             &chip->pci->dev,
                                              64*1024, 128*1024);
 
        /* pre-select AC97 SPDIF slots 10/11 */
index 95d209f9658130fd9baa7176d15bb8958f3ccfee..6f088c1949f335c93b92933c9202f73366d529a7 100644 (file)
@@ -321,7 +321,7 @@ static int atiixp_build_dma_packets(struct atiixp_modem *chip,
                return -ENOMEM;
 
        if (dma->desc_buf.area == NULL) {
-               if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci),
+               if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &chip->pci->dev,
                                        ATI_DESC_LIST_SIZE, &dma->desc_buf) < 0)
                        return -ENOMEM;
                dma->period_bytes = dma->periods = 0; /* clear */
@@ -995,7 +995,7 @@ static int snd_atiixp_pcm_new(struct atiixp_modem *chip)
        chip->pcmdevs[ATI_PCMDEV_ANALOG] = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->pci),
+                                             &chip->pci->dev,
                                              64*1024, 128*1024);
 
        return 0;
index b835042893d924f1baa49dcbca6e98b1ec315c51..1012e8da29e750c4a4d5a1247bd1bbbae6bf7322 100644 (file)
@@ -637,7 +637,7 @@ static int snd_vortex_new_pcm(vortex_t *chip, int idx, int nr)
        /* pre-allocation of Scatter-Gather buffers */
        
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
-                                             snd_dma_pci_data(chip->pci_dev),
+                                             &chip->pci_dev,
                                              0x10000, 0x10000);
 
        switch (VORTEX_PCM_TYPE(pcm)) {
index e413414181dfd23e1555d3f1add054a9acdfca00..1cbfae856a2a9909ca54ad08f7f92abc072cbb89 100644 (file)
@@ -613,7 +613,7 @@ static int snd_aw2_new_pcm(struct aw2 *chip)
        /* Preallocate continuous pages. */
        snd_pcm_lib_preallocate_pages_for_all(pcm_playback_ana,
                                              SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->pci),
+                                             &chip->pci->dev,
                                              64 * 1024, 64 * 1024);
 
        err = snd_pcm_new(chip->card, "Audiowerk2 digital playback", 1, 1, 0,
@@ -645,7 +645,7 @@ static int snd_aw2_new_pcm(struct aw2 *chip)
        /* Preallocate continuous pages. */
        snd_pcm_lib_preallocate_pages_for_all(pcm_playback_num,
                                              SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->pci),
+                                             &chip->pci->dev,
                                              64 * 1024, 64 * 1024);
 
        err = snd_pcm_new(chip->card, "Audiowerk2 capture", 2, 0, 1,
@@ -678,7 +678,7 @@ static int snd_aw2_new_pcm(struct aw2 *chip)
        /* Preallocate continuous pages. */
        snd_pcm_lib_preallocate_pages_for_all(pcm_capture,
                                              SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->pci),
+                                             &chip->pci->dev,
                                              64 * 1024, 64 * 1024);
 
        /* Create control */
index f92c9cbb955a211cb85ca7907a9b8537973d3995..f475370faaaa2dc815e4837f3654c30e2ce03ed3 100644 (file)
@@ -2135,8 +2135,8 @@ snd_azf3328_pcm(struct snd_azf3328 *chip)
        chip->pcm[AZF_CODEC_CAPTURE] = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                               snd_dma_pci_data(chip->pci),
-                                                       64*1024, 64*1024);
+                                             &chip->pci->dev,
+                                             64*1024, 64*1024);
 
        err = snd_pcm_new(chip->card, "AZF3328 I2S OUT", AZF_PCMDEV_I2S_OUT,
                                                                1, 0, &pcm);
@@ -2151,8 +2151,8 @@ snd_azf3328_pcm(struct snd_azf3328 *chip)
        chip->pcm[AZF_CODEC_I2S_OUT] = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                               snd_dma_pci_data(chip->pci),
-                                                       64*1024, 64*1024);
+                                             &chip->pci->dev,
+                                             64*1024, 64*1024);
 
        return 0;
 }
index d4b6da79ef49f4ed5d6cf666ed1205f98bcc3654..6bf5ac3600c5422cb2578b07ff447d965b5b30a5 100644 (file)
@@ -217,7 +217,7 @@ static int snd_bt87x_create_risc(struct snd_bt87x *chip, struct snd_pcm_substrea
        __le32 *risc;
 
        if (chip->dma_risc.area == NULL) {
-               if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci),
+               if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &chip->pci->dev,
                                        PAGE_ALIGN(MAX_RISC_SIZE), &chip->dma_risc) < 0)
                        return -ENOMEM;
        }
@@ -700,7 +700,7 @@ static int snd_bt87x_pcm(struct snd_bt87x *chip, int device, char *name)
        strcpy(pcm->name, name);
        snd_pcm_set_ops(pcm, SNDRV_PCM_STREAM_CAPTURE, &snd_bt87x_pcm_ops);
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
-                                             snd_dma_pci_data(chip->pci),
+                                             &chip->pci->dev,
                                              128 * 1024,
                                              ALIGN(255 * 4092, 1024));
        return 0;
index 478412e0aa3c76a9c4c891d1bfa09f966922b9f9..abc2440dc2d9d66dceb05d095c8a8f1a3950ed11 100644 (file)
@@ -1389,7 +1389,7 @@ static int snd_ca0106_pcm(struct snd_ca0106 *emu, int device)
            substream; 
            substream = substream->next) {
                snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(emu->pci),
+                                             &emu->pci->dev,
                                              64*1024, 64*1024);
        }
 
@@ -1397,7 +1397,7 @@ static int snd_ca0106_pcm(struct snd_ca0106 *emu, int device)
              substream; 
              substream = substream->next) {
                snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(emu->pci),
+                                             &emu->pci->dev,
                                              64*1024, 64*1024);
        }
   
@@ -1692,7 +1692,7 @@ static int snd_ca0106_create(int dev, struct snd_card *card,
        chip->irq = pci->irq;
 
        /* This stores the periods table. */
-       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
+       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev,
                                1024, &chip->buffer) < 0) {
                snd_ca0106_free(chip);
                return -ENOMEM;
index df720881eb9918c8e8beb173e56119f26767b7b5..dd9d62e2b633852d073ad240b1efbb14d622d1c9 100644 (file)
@@ -1902,7 +1902,7 @@ static int snd_cmipci_pcm_new(struct cmipci *cm, int device)
        cm->pcm = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(cm->pci), 64*1024, 128*1024);
+                                             &cm->pci->dev, 64*1024, 128*1024);
 
        return 0;
 }
@@ -1924,7 +1924,7 @@ static int snd_cmipci_pcm2_new(struct cmipci *cm, int device)
        cm->pcm2 = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(cm->pci), 64*1024, 128*1024);
+                                             &cm->pci->dev, 64*1024, 128*1024);
 
        return 0;
 }
@@ -1947,7 +1947,7 @@ static int snd_cmipci_pcm_spdif_new(struct cmipci *cm, int device)
        cm->pcm_spdif = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(cm->pci), 64*1024, 128*1024);
+                                             &cm->pci->dev, 64*1024, 128*1024);
 
        err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK,
                                     snd_pcm_alt_chmaps, cm->max_channels, 0,
index 04c712647853d538ca915984c38c33439b093054..058c1414b777988ed60c43ff2b02e93bbafb7745 100644 (file)
@@ -975,7 +975,8 @@ static int snd_cs4281_pcm(struct cs4281 *chip, int device)
        chip->pcm = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->pci), 64*1024, 512*1024);
+                                             &chip->pci->dev,
+                                             64*1024, 512*1024);
 
        return 0;
 }
index 5b888b795f7ee85ec74b5fdf0d4581b690d16677..102a62965ac15475b515259adc2d9762deecb48f 100644 (file)
@@ -1494,7 +1494,7 @@ static int _cs46xx_playback_open_channel (struct snd_pcm_substream *substream,in
        cpcm = kzalloc(sizeof(*cpcm), GFP_KERNEL);
        if (cpcm == NULL)
                return -ENOMEM;
-       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci),
+       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &chip->pci->dev,
                                PAGE_SIZE, &cpcm->hw_buf) < 0) {
                kfree(cpcm);
                return -ENOMEM;
@@ -1582,7 +1582,7 @@ static int snd_cs46xx_capture_open(struct snd_pcm_substream *substream)
 {
        struct snd_cs46xx *chip = snd_pcm_substream_chip(substream);
 
-       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci),
+       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &chip->pci->dev,
                                PAGE_SIZE, &chip->capt.hw_buf) < 0)
                return -ENOMEM;
        chip->capt.substream = substream;
@@ -1784,7 +1784,8 @@ int snd_cs46xx_pcm(struct snd_cs46xx *chip, int device)
        chip->pcm = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->pci), 64*1024, 256*1024);
+                                             &chip->pci->dev,
+                                             64*1024, 256*1024);
 
        return 0;
 }
@@ -1809,7 +1810,8 @@ int snd_cs46xx_pcm_rear(struct snd_cs46xx *chip, int device)
        chip->pcm_rear = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->pci), 64*1024, 256*1024);
+                                             &chip->pci->dev,
+                                             64*1024, 256*1024);
 
        return 0;
 }
@@ -1832,7 +1834,8 @@ int snd_cs46xx_pcm_center_lfe(struct snd_cs46xx *chip, int device)
        chip->pcm_center_lfe = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->pci), 64*1024, 256*1024);
+                                             &chip->pci->dev,
+                                             64*1024, 256*1024);
 
        return 0;
 }
@@ -1855,7 +1858,8 @@ int snd_cs46xx_pcm_iec958(struct snd_cs46xx *chip, int device)
        chip->pcm_iec958 = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->pci), 64*1024, 256*1024);
+                                             &chip->pci->dev,
+                                             64*1024, 256*1024);
 
        return 0;
 }
index 04822bf2f9870e324e8bf6a04a65e19f2c7c5ccb..4642e5384e831f9c88717c3fe5121593ea96955b 100644 (file)
@@ -117,7 +117,7 @@ static int cs5535audio_build_dma_packets(struct cs5535audio *cs5535au,
 
        if (dma->desc_buf.area == NULL) {
                if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV,
-                                       snd_dma_pci_data(cs5535au->pci),
+                                       &cs5535au->pci->dev,
                                        CS5535AUDIO_DESC_LIST_SIZE+1,
                                        &dma->desc_buf) < 0)
                        return -ENOMEM;
@@ -432,8 +432,8 @@ int snd_cs5535audio_pcm(struct cs5535audio *cs5535au)
        strcpy(pcm->name, "CS5535 Audio");
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                       snd_dma_pci_data(cs5535au->pci),
-                                       64*1024, 128*1024);
+                                             &cs5535au->pci->dev,
+                                             64*1024, 128*1024);
        cs5535au->pcm = pcm;
 
        return 0;
index c341f509e4fc82e2fb18cdca1065ad9d8a194962..7ae5b238703c2bb90a3fb6b0ea9145a7c3e37412 100644 (file)
@@ -450,7 +450,8 @@ int ct_alsa_pcm_create(struct ct_atc *atc,
                                SNDRV_PCM_STREAM_CAPTURE, &ct_pcm_capture_ops);
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
-                       snd_dma_pci_data(atc->pci), 128*1024, 128*1024);
+                                             &atc->pci->dev,
+                                             128*1024, 128*1024);
 
        chs = 2;
        switch (device) {
index 2e80b17a7104bf732349febfb26ad17a931a07f9..bde28aa9e13964f958699e2aa9241ab31e805c89 100644 (file)
@@ -183,7 +183,7 @@ int ct_vm_create(struct ct_vm **rvm, struct pci_dev *pci)
        /* Allocate page table pages */
        for (i = 0; i < CT_PTP_NUM; i++) {
                err = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV,
-                                         snd_dma_pci_data(pci),
+                                         &pci->dev,
                                          PAGE_SIZE, &vm->ptp[i]);
                if (err < 0)
                        break;
index f208b6e217fdddee08bcbc3ca26fb02cff42c9de..29b7720d7961abf327426a3fec8c3251e73ed934 100644 (file)
@@ -124,8 +124,9 @@ static int snd_card_emu10k1_probe(struct pci_dev *pci,
                goto error;
        /* This stores the periods table. */
        if (emu->card_capabilities->ca0151_chip) { /* P16V */   
-               if ((err = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
-                                              1024, &emu->p16v_buffer)) < 0)
+               err = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev,
+                                         1024, &emu->p16v_buffer);
+               if (err < 0)
                        goto error;
        }
 
index 9cf81832259c461abb687d91de0630bf28facfff..241b4a0631ab8b6d59b24f44b6918392b9dea263 100644 (file)
@@ -877,7 +877,7 @@ static int snd_emu10k1x_pcm(struct emu10k1x *emu, int device)
        emu->pcm = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(emu->pci), 
+                                             &emu->pci->dev,
                                              32*1024, 32*1024);
   
        return snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK, map, 2,
@@ -936,8 +936,8 @@ static int snd_emu10k1x_create(struct snd_card *card,
        }
        chip->irq = pci->irq;
   
-       if(snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
-                              4 * 1024, &chip->dma_buffer) < 0) {
+       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev,
+                               4 * 1024, &chip->dma_buffer) < 0) {
                snd_emu10k1x_free(chip);
                return -ENOMEM;
        }
index e053f0d58bdd08fb72999e6b60cdf6a7cb44d3aa..a31adecfe608af21626c8916112668fb26f2ea16 100644 (file)
@@ -2464,7 +2464,7 @@ int snd_emu10k1_fx8010_tram_setup(struct snd_emu10k1 *emu, u32 size)
        }
 
        if (size > 0) {
-               if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(emu->pci),
+               if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &emu->pci->dev,
                                        size * 2, &emu->fx8010.etram_pages) < 0)
                        return -ENOMEM;
                memset(emu->fx8010.etram_pages.area, 0, size * 2);
index 46d8768adc019b8848d38351cebf996fb4711ec9..9a8cf3c7dd67af3889e720fe18c6e7c30fc5779c 100644 (file)
@@ -1412,12 +1412,12 @@ int snd_emu10k1_pcm(struct snd_emu10k1 *emu, int device)
 
        for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next)
                snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV_SG,
-                                             snd_dma_pci_data(emu->pci),
+                                             &emu->pci->dev,
                                              64*1024, 64*1024);
 
        for (substream = pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream; substream; substream = substream->next)
                snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(emu->pci),
+                                             &emu->pci->dev,
                                              64*1024, 64*1024);
 
        return 0;
@@ -1443,7 +1443,7 @@ int snd_emu10k1_pcm_multi(struct snd_emu10k1 *emu, int device)
 
        for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next)
                snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV_SG,
-                                             snd_dma_pci_data(emu->pci),
+                                             &emu->pci->dev,
                                              64*1024, 64*1024);
 
        return 0;
@@ -1478,7 +1478,7 @@ int snd_emu10k1_pcm_mic(struct snd_emu10k1 *emu, int device)
        emu->pcm_mic = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(emu->pci),
+                                             &emu->pci->dev,
                                              64*1024, 64*1024);
 
        return 0;
@@ -1853,7 +1853,7 @@ int snd_emu10k1_pcm_efx(struct snd_emu10k1 *emu, int device)
                return err;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(emu->pci),
+                                             &emu->pci->dev,
                                              64*1024, 64*1024);
 
        return 0;
index 135e265442750b44fe81f792ee2dcb5762d08a67..94b8d5b082259692c4ea54cd844b6358ecd4523c 100644 (file)
@@ -387,7 +387,7 @@ int snd_emu10k1_alloc_pages_maybe_wider(struct snd_emu10k1 *emu, size_t size,
        }
 
        return snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV,
-                                  snd_dma_pci_data(emu->pci), size, dmab);
+                                  &emu->pci->dev, size, dmab);
 }
 
 /*
@@ -477,7 +477,7 @@ static void __synth_free_pages(struct snd_emu10k1 *emu, int first_page,
        int page;
 
        dmab.dev.type = SNDRV_DMA_TYPE_DEV;
-       dmab.dev.dev = snd_dma_pci_data(emu->pci);
+       dmab.dev.dev = &emu->pci->dev;
 
        for (page = first_page; page <= last_page; page++) {
                if (emu->page_ptr_table[page] == NULL)
index eeaed555185c35f529896366b9d115b3722daf96..ab887685598916c6f2e23452f83a82d7a15dfd13 100644 (file)
@@ -643,7 +643,7 @@ int snd_p16v_pcm(struct snd_emu10k1 *emu, int device)
            substream; 
            substream = substream->next) {
                snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(emu->pci),
+                                             &emu->pci->dev,
                                              (65536 - 64) * 8,
                                              (65536 - 64) * 8);
                /*
@@ -656,7 +656,7 @@ int snd_p16v_pcm(struct snd_emu10k1 *emu, int device)
              substream; 
              substream = substream->next) {
                snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(emu->pci),
+                                             &emu->pci->dev,
                                              65536 - 64, 65536 - 64);
                /*
                dev_dbg(emu->card->dev,
index b767df8181b5f3c7c9a43915b2c1f7ba275d5493..0499dc863202876651791e7ec173e6d6028d8fee 100644 (file)
@@ -1275,7 +1275,8 @@ static int snd_ensoniq_pcm(struct ensoniq *ensoniq, int device)
        ensoniq->pcm1 = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(ensoniq->pci), 64*1024, 128*1024);
+                                             &ensoniq->pci->dev,
+                                             64*1024, 128*1024);
 
 #ifdef CHIP1370
        err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK,
@@ -1307,7 +1308,8 @@ static int snd_ensoniq_pcm2(struct ensoniq *ensoniq, int device)
        ensoniq->pcm2 = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(ensoniq->pci), 64*1024, 128*1024);
+                                             &ensoniq->pci->dev,
+                                             64*1024, 128*1024);
 
 #ifdef CHIP1370
        err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK,
@@ -2095,7 +2097,7 @@ static int snd_ensoniq_create(struct snd_card *card,
        }
        ensoniq->irq = pci->irq;
 #ifdef CHIP1370
-       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
+       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev,
                                16, &ensoniq->dma_bug) < 0) {
                dev_err(card->dev, "unable to allocate space for phantom area - dma_bug\n");
                snd_ensoniq_free(ensoniq);
index ecf77c8c9e5947b3cfd70e02aca38f99b20ce46c..c571c5d380ca5aad0ddd3f393e37668791af0cca 100644 (file)
@@ -1032,7 +1032,8 @@ static int snd_es1938_new_pcm(struct es1938 *chip, int device)
        strcpy(pcm->name, "ESS Solo-1");
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->pci), 64*1024, 64*1024);
+                                             &chip->pci->dev,
+                                             64*1024, 64*1024);
 
        chip->pcm = pcm;
        return 0;
index 3ef7d507eb9bfe12c8c1b64c192bb578075c4aa4..a7f8109acced78f4d246422fb0baff3e4e5e090b 100644 (file)
@@ -721,7 +721,7 @@ static int snd_fm801_pcm(struct fm801 *chip, int device)
        chip->pcm = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(pdev),
+                                             &pdev->dev,
                                              chip->multichannel ? 128*1024 : 64*1024, 128*1024);
 
        return snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK,
index 4b0dea7f766987c7b21c8f6c793ea8f35dab12cf..deadba40131ca53a5d3d5b47c661882d9cfaff0d 100644 (file)
@@ -884,7 +884,8 @@ static int snd_ice1712_pcm(struct snd_ice1712 *ice, int device)
        ice->pcm = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(ice->pci), 64*1024, 64*1024);
+                                             &ice->pci->dev,
+                                             64*1024, 64*1024);
 
        dev_warn(ice->card->dev,
                 "Consumer PCM code does not work well at the moment --jk\n");
@@ -909,7 +910,8 @@ static int snd_ice1712_pcm_ds(struct snd_ice1712 *ice, int device)
        ice->pcm_ds = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(ice->pci), 64*1024, 128*1024);
+                                             &ice->pci->dev,
+                                             64*1024, 128*1024);
 
        return 0;
 }
@@ -1253,7 +1255,8 @@ static int snd_ice1712_pcm_profi(struct snd_ice1712 *ice, int device)
        strcpy(pcm->name, "ICE1712 multi");
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(ice->pci), 256*1024, 256*1024);
+                                             &ice->pci->dev,
+                                             256*1024, 256*1024);
 
        ice->pcm_pro = pcm;
 
index e62c11816683ee03c8f667dae71ac4c8ecd641f4..c80a16ee6e76171ed5123e0c374b83afbd1e6545 100644 (file)
@@ -1143,7 +1143,7 @@ static int snd_vt1724_pcm_profi(struct snd_ice1712 *ice, int device)
        strcpy(pcm->name, "ICE1724");
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(ice->pci),
+                                             &ice->pci->dev,
                                              256*1024, 256*1024);
 
        ice->pcm_pro = pcm;
@@ -1341,7 +1341,7 @@ static int snd_vt1724_pcm_spdif(struct snd_ice1712 *ice, int device)
        strcpy(pcm->name, name);
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(ice->pci),
+                                             &ice->pci->dev,
                                              256*1024, 256*1024);
 
        ice->pcm = pcm;
@@ -1455,7 +1455,7 @@ static int snd_vt1724_pcm_indep(struct snd_ice1712 *ice, int device)
        strcpy(pcm->name, "ICE1724 Surround PCM");
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(ice->pci),
+                                             &ice->pci->dev,
                                              256*1024, 256*1024);
 
        ice->pcm_ds = pcm;
index 6ff94d8ad86e526a495c3cd0e5bae917309396b2..12374ba08ca2c76b64ac19b0f1f82f9b060fa8e3 100644 (file)
@@ -1488,7 +1488,7 @@ static int snd_intel8x0_pcm1(struct intel8x0 *chip, int device,
        chip->pcm[device] = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, intel8x0_dma_type(chip),
-                                             snd_dma_pci_data(chip->pci),
+                                             &chip->pci->dev,
                                              rec->prealloc_size, rec->prealloc_max_size);
 
        if (rec->playback_ops &&
@@ -3047,7 +3047,7 @@ static int snd_intel8x0_create(struct snd_card *card,
 
        /* allocate buffer descriptor lists */
        /* the start of each lists must be aligned to 8 bytes */
-       if (snd_dma_alloc_pages(intel8x0_dma_type(chip), snd_dma_pci_data(pci),
+       if (snd_dma_alloc_pages(intel8x0_dma_type(chip), &pci->dev,
                                chip->bdbars_count * sizeof(u32) * ICH_MAX_FRAGS * 2,
                                &chip->bdbars) < 0) {
                snd_intel8x0_free(chip);
index 2f960fb092df6c2d11d12696d4ce85803d619381..a9add5fedfcbde91ea0cd8f7e1a842bf3ec6d1a3 100644 (file)
@@ -734,7 +734,7 @@ static int snd_intel8x0m_pcm1(struct intel8x0m *chip, int device,
        chip->pcm[device] = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->pci),
+                                             &chip->pci->dev,
                                              rec->prealloc_size,
                                              rec->prealloc_max_size);
 
@@ -1176,7 +1176,7 @@ static int snd_intel8x0m_create(struct snd_card *card,
 
        /* allocate buffer descriptor lists */
        /* the start of each lists must be aligned to 8 bytes */
-       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
+       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev,
                                chip->bdbars_count * sizeof(u32) * ICH_MAX_FRAGS * 2,
                                &chip->bdbars) < 0) {
                snd_intel8x0m_free(chip);
index 0d81eac0a478cfcdd5dcebcdc313a2155fef2f6d..2b8204a13c69019614b0435dad7765905c0b9b57 100644 (file)
@@ -2275,7 +2275,7 @@ static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci,
                    korg1212->idRegPtr,
                   stateName[korg1212->cardState]);
 
-       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
+       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev,
                                sizeof(struct KorgSharedBuffer), &korg1212->dma_shared) < 0) {
                snd_printk(KERN_ERR "korg1212: can not allocate shared buffer memory (%zd bytes)\n", sizeof(struct KorgSharedBuffer));
                 snd_korg1212_free(korg1212);
@@ -2290,7 +2290,7 @@ static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci,
 
         korg1212->DataBufsSize = sizeof(struct KorgAudioBuffer) * kNumBuffers;
 
-       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
+       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev,
                                korg1212->DataBufsSize, &korg1212->dma_play) < 0) {
                snd_printk(KERN_ERR "korg1212: can not allocate play data buffer memory (%d bytes)\n", korg1212->DataBufsSize);
                 snd_korg1212_free(korg1212);
@@ -2302,7 +2302,7 @@ static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci,
         K1212_DEBUG_PRINTK("K1212_DEBUG: Play Data Area = 0x%p (0x%08x), %d bytes\n",
                korg1212->playDataBufsPtr, korg1212->PlayDataPhy, korg1212->DataBufsSize);
 
-       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
+       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev,
                                korg1212->DataBufsSize, &korg1212->dma_rec) < 0) {
                snd_printk(KERN_ERR "korg1212: can not allocate record data buffer memory (%d bytes)\n", korg1212->DataBufsSize);
                 snd_korg1212_free(korg1212);
@@ -2337,7 +2337,7 @@ static int snd_korg1212_create(struct snd_card *card, struct pci_dev *pci,
                return err;
        }
 
-       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
+       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev,
                                dsp_code->size, &korg1212->dma_dsp) < 0) {
                snd_printk(KERN_ERR "korg1212: cannot allocate dsp code memory (%zd bytes)\n", dsp_code->size);
                 snd_korg1212_free(korg1212);
index 5cda3488ceab790d376cf364400b9adc9fb85250..21ac9d003e8e5b3870ce42b2e4059190a7dd74d5 100644 (file)
@@ -350,7 +350,7 @@ static int setup_corb_rirb(struct lola *chip)
        unsigned long end_time;
 
        err = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV,
-                                 snd_dma_pci_data(chip->pci),
+                                 &chip->pci->dev,
                                  PAGE_SIZE, &chip->rb);
        if (err < 0)
                return err;
index f032d7ceb6e5d242128bf444725877e2d94fd8a4..856bcca601283ffa45bba67fb5698e489d6dce6f 100644 (file)
@@ -591,7 +591,7 @@ int lola_create_pcm(struct lola *chip)
 
        for (i = 0; i < 2; i++) {
                err = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV,
-                                         snd_dma_pci_data(chip->pci),
+                                         &chip->pci->dev,
                                          PAGE_SIZE, &chip->pcm[i].bdl);
                if (err < 0)
                        return err;
@@ -611,7 +611,7 @@ int lola_create_pcm(struct lola *chip)
        }
        /* buffer pre-allocation */
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
-                                             snd_dma_pci_data(chip->pci),
+                                             &chip->pci->dev,
                                              1024 * 64, 32 * 1024 * 1024);
        return 0;
 }
index fe10714380f2ce1a48e9bf142381144bcc6e3c63..d0f63fa5412111935522a75cc50a86df94c9e6d0 100644 (file)
@@ -846,7 +846,7 @@ static int lx_pcm_create(struct lx6464es *chip)
        strcpy(pcm->name, card_name);
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->pci),
+                                             &chip->pci->dev,
                                              size, size);
 
        chip->pcm = pcm;
index 19fa73df084657be33e01b11060f63601daad05c..cc8594d76c70821de7acf85f2b526f8578ff500a 100644 (file)
@@ -1861,7 +1861,8 @@ snd_m3_pcm(struct snd_m3 * chip, int device)
        chip->pcm = pcm;
        
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->pci), 64*1024, 64*1024);
+                                             &chip->pci->dev,
+                                             64*1024, 64*1024);
 
        return 0;
 }
index e5279ce54ee1a792954b582b4e982d56ccd98954..674d37ec96b39c296ad894f79ab7df5e6e5954fc 100644 (file)
@@ -948,7 +948,8 @@ static void preallocate_buffers(struct snd_mixart *chip, struct snd_pcm *pcm)
        }
 #endif
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->mgr->pci), 32*1024, 32*1024);
+                                             &chip->mgr->pci->dev,
+                                             32*1024, 32*1024);
 }
 
 /*
@@ -1360,7 +1361,7 @@ static int snd_mixart_probe(struct pci_dev *pci,
        /* create array of streaminfo */
        size = PAGE_ALIGN( (MIXART_MAX_STREAM_PER_CARD * MIXART_MAX_CARDS *
                            sizeof(struct mixart_flowinfo)) );
-       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
+       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev,
                                size, &mgr->flowinfo) < 0) {
                snd_mixart_free(mgr);
                return -ENOMEM;
@@ -1371,7 +1372,7 @@ static int snd_mixart_probe(struct pci_dev *pci,
        /* create array of bufferinfo */
        size = PAGE_ALIGN( (MIXART_MAX_STREAM_PER_CARD * MIXART_MAX_CARDS *
                            sizeof(struct mixart_bufferinfo)) );
-       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
+       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev,
                                size, &mgr->bufferinfo) < 0) {
                snd_mixart_free(mgr);
                return -ENOMEM;
index e6aa16646fd4f70c8d81dca8eb2582a5d9ef78d5..203c8fe48a0170510868d1906b2e6a7481887c7d 100644 (file)
@@ -713,13 +713,13 @@ int oxygen_pcm_init(struct oxygen *chip)
                if (outs)
                        snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream,
                                                      SNDRV_DMA_TYPE_DEV,
-                                                     snd_dma_pci_data(chip->pci),
+                                                     &chip->pci->dev,
                                                      DEFAULT_BUFFER_BYTES_MULTICH,
                                                      BUFFER_BYTES_MAX_MULTICH);
                if (ins)
                        snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream,
                                                      SNDRV_DMA_TYPE_DEV,
-                                                     snd_dma_pci_data(chip->pci),
+                                                     &chip->pci->dev,
                                                      DEFAULT_BUFFER_BYTES,
                                                      BUFFER_BYTES_MAX);
        }
@@ -739,7 +739,7 @@ int oxygen_pcm_init(struct oxygen *chip)
                pcm->private_data = chip;
                strcpy(pcm->name, "Digital");
                snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                                     snd_dma_pci_data(chip->pci),
+                                                     &chip->pci->dev,
                                                      DEFAULT_BUFFER_BYTES,
                                                      BUFFER_BYTES_MAX);
        }
@@ -769,7 +769,7 @@ int oxygen_pcm_init(struct oxygen *chip)
                pcm->private_data = chip;
                strcpy(pcm->name, outs ? "Front Panel" : "Analog 2");
                snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                                     snd_dma_pci_data(chip->pci),
+                                                     &chip->pci->dev,
                                                      DEFAULT_BUFFER_BYTES,
                                                      BUFFER_BYTES_MAX);
        }
@@ -787,7 +787,7 @@ int oxygen_pcm_init(struct oxygen *chip)
                pcm->private_data = chip;
                strcpy(pcm->name, "Analog 3");
                snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                                     snd_dma_pci_data(chip->pci),
+                                                     &chip->pci->dev,
                                                      DEFAULT_BUFFER_BYTES,
                                                      BUFFER_BYTES_MAX);
        }
index e493962d8455159f24103e744dd79504feb07bb7..4af34d6d92dfcd9c2e9b2b609d59df73da9b53e4 100644 (file)
@@ -1171,7 +1171,7 @@ int pcxhr_create_pcm(struct snd_pcxhr *chip)
        strcpy(pcm->name, name);
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->mgr->pci),
+                                             &chip->mgr->pci->dev,
                                              32*1024, 32*1024);
        chip->pcm = pcm;
        return 0;
@@ -1644,7 +1644,7 @@ static int pcxhr_probe(struct pci_dev *pci,
 
        /* create hostport purgebuffer */
        size = PAGE_ALIGN(sizeof(struct pcxhr_hostport));
-       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(pci),
+       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &pci->dev,
                                size, &mgr->hostport) < 0) {
                pcxhr_free(mgr);
                return -ENOMEM;
index ac10d6f229d8055bdf924a12787e743519038b74..abcea86045ec0350c9de8aa3d36ac8a271704e4d 100644 (file)
@@ -1550,7 +1550,7 @@ snd_riptide_hw_params(struct snd_pcm_substream *substream,
        if (sgdlist->area)
                snd_dma_free_pages(sgdlist);
        if ((err = snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV,
-                                      snd_dma_pci_data(chip->pci),
+                                      &chip->pci->dev,
                                       sizeof(struct sgd) * (DESC_MAX_MASK + 1),
                                       sgdlist)) < 0) {
                snd_printk(KERN_ERR "Riptide: failed to alloc %d dma bytes\n",
@@ -1693,7 +1693,7 @@ static int snd_riptide_pcm(struct snd_riptide *chip, int device)
        strcpy(pcm->name, "RIPTIDE");
        chip->pcm = pcm;
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
-                                             snd_dma_pci_data(chip->pci),
+                                             &chip->pci->dev,
                                              64 * 1024, 128 * 1024);
        return 0;
 }
index b0b5e74e776ca69a59f68000043b89e66fc03adc..ef7dd290ae05cf815f68c68d7b8d50deeada8d64 100644 (file)
@@ -905,7 +905,8 @@ static int sis_pcm_create(struct sis7019 *sis)
         * world if this fails.
         */
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                               snd_dma_pci_data(sis->pci), 64*1024, 128*1024);
+                                             &sis->pci->dev,
+                                             64*1024, 128*1024);
 
        return 0;
 }
index 13103f5c309b56587984499441ee0e7cd6f0a66d..31cbc811ad37cd1ebbaa31361fd06416ed8347b7 100644 (file)
@@ -884,7 +884,8 @@ static int snd_sonicvibes_pcm(struct sonicvibes *sonic, int device)
        sonic->pcm = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(sonic->pci), 64*1024, 128*1024);
+                                             &sonic->pci->dev,
+                                             64*1024, 128*1024);
 
        return 0;
 }
index 8ac6f541b008304a6dfa45377e69465d283bf0a3..07022c0dad40bca0efdda68d272b224bc1f75067 100644 (file)
@@ -2184,14 +2184,16 @@ int snd_trident_pcm(struct snd_trident *trident, int device)
                struct snd_pcm_substream *substream;
                for (substream = pcm->streams[SNDRV_PCM_STREAM_PLAYBACK].substream; substream; substream = substream->next)
                        snd_pcm_lib_preallocate_pages(substream, SNDRV_DMA_TYPE_DEV_SG,
-                                                     snd_dma_pci_data(trident->pci),
+                                                     &trident->pci->dev,
                                                      64*1024, 128*1024);
                snd_pcm_lib_preallocate_pages(pcm->streams[SNDRV_PCM_STREAM_CAPTURE].substream,
-                                             SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(trident->pci),
+                                             SNDRV_DMA_TYPE_DEV,
+                                             &trident->pci->dev,
                                              64*1024, 128*1024);
        } else {
                snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                                     snd_dma_pci_data(trident->pci), 64*1024, 128*1024);
+                                                     &trident->pci->dev,
+                                                     64*1024, 128*1024);
        }
 
        return 0;
@@ -2241,10 +2243,12 @@ int snd_trident_foldback_pcm(struct snd_trident *trident, int device)
 
        if (trident->tlb.entries)
                snd_pcm_lib_preallocate_pages_for_all(foldback, SNDRV_DMA_TYPE_DEV_SG,
-                                                     snd_dma_pci_data(trident->pci), 0, 128*1024);
+                                                     &trident->pci->dev,
+                                                     0, 128*1024);
        else
                snd_pcm_lib_preallocate_pages_for_all(foldback, SNDRV_DMA_TYPE_DEV,
-                                                     snd_dma_pci_data(trident->pci), 64*1024, 128*1024);
+                                                     &trident->pci->dev,
+                                                     64*1024, 128*1024);
 
        return 0;
 }
@@ -2278,7 +2282,9 @@ int snd_trident_spdif_pcm(struct snd_trident *trident, int device)
        strcpy(spdif->name, "Trident 4DWave IEC958");
        trident->spdif = spdif;
 
-       snd_pcm_lib_preallocate_pages_for_all(spdif, SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(trident->pci), 64*1024, 128*1024);
+       snd_pcm_lib_preallocate_pages_for_all(spdif, SNDRV_DMA_TYPE_DEV,
+                                             &trident->pci->dev,
+                                             64*1024, 128*1024);
 
        return 0;
 }
@@ -3336,7 +3342,7 @@ static int snd_trident_tlb_alloc(struct snd_trident *trident)
        /* TLB array must be aligned to 16kB !!! so we allocate
           32kB region and correct offset when necessary */
 
-       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(trident->pci),
+       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &trident->pci->dev,
                                2 * SNDRV_TRIDENT_MAX_PAGES * 4, &trident->tlb.buffer) < 0) {
                dev_err(trident->card->dev, "unable to allocate TLB buffer\n");
                return -ENOMEM;
@@ -3351,7 +3357,7 @@ static int snd_trident_tlb_alloc(struct snd_trident *trident)
                return -ENOMEM;
 
        /* allocate and setup silent page and initialise TLB entries */
-       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(trident->pci),
+       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &trident->pci->dev,
                                SNDRV_TRIDENT_PAGE_SIZE, &trident->tlb.silent_page) < 0) {
                dev_err(trident->card->dev, "unable to allocate silent page\n");
                return -ENOMEM;
index 902409dbc4c8382d5133ceff1b1abc2be509ac0c..30c817b6b63550479a03bbf83160500eef417c2f 100644 (file)
@@ -419,7 +419,7 @@ static int build_via_table(struct viadev *dev, struct snd_pcm_substream *substre
                /* the start of each lists must be aligned to 8 bytes,
                 * but the kernel pages are much bigger, so we don't care
                 */
-               if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci),
+               if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &chip->pci->dev,
                                        PAGE_ALIGN(VIA_TABLE_SIZE * 2 * 8),
                                        &dev->table) < 0)
                        return -ENOMEM;
@@ -1454,7 +1454,7 @@ static int snd_via8233_pcm_new(struct via82xx *chip)
        init_viadev(chip, chip->capture_devno, VIA_REG_CAPTURE_8233_STATUS, 6, 1);
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
-                                             snd_dma_pci_data(chip->pci),
+                                             &chip->pci->dev,
                                              64*1024, VIA_MAX_BUFSIZE);
 
        err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK,
@@ -1478,7 +1478,7 @@ static int snd_via8233_pcm_new(struct via82xx *chip)
        init_viadev(chip, chip->capture_devno + 1, VIA_REG_CAPTURE_8233_STATUS + 0x10, 7, 1);
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
-                                             snd_dma_pci_data(chip->pci),
+                                             &chip->pci->dev,
                                              64*1024, VIA_MAX_BUFSIZE);
 
        err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK,
@@ -1521,7 +1521,7 @@ static int snd_via8233a_pcm_new(struct via82xx *chip)
        init_viadev(chip, chip->capture_devno, VIA_REG_CAPTURE_8233_STATUS, 6, 1);
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
-                                             snd_dma_pci_data(chip->pci),
+                                             &chip->pci->dev,
                                              64*1024, VIA_MAX_BUFSIZE);
 
        err = snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK,
@@ -1547,7 +1547,7 @@ static int snd_via8233a_pcm_new(struct via82xx *chip)
        init_viadev(chip, chip->playback_devno, 0x30, 3, 0);
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
-                                             snd_dma_pci_data(chip->pci),
+                                             &chip->pci->dev,
                                              64*1024, VIA_MAX_BUFSIZE);
        return 0;
 }
@@ -1577,7 +1577,7 @@ static int snd_via686_pcm_new(struct via82xx *chip)
        init_viadev(chip, 1, VIA_REG_CAPTURE_STATUS, 0, 1);
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
-                                             snd_dma_pci_data(chip->pci),
+                                             &chip->pci->dev,
                                              64*1024, VIA_MAX_BUFSIZE);
        return 0;
 }
index 2c8370cf03b338ce66743e8d18973b131fa34f10..0edb9ea6e8a6f7c941c20af1914ece7f26b90af7 100644 (file)
@@ -272,7 +272,7 @@ static int build_via_table(struct viadev *dev, struct snd_pcm_substream *substre
                /* the start of each lists must be aligned to 8 bytes,
                 * but the kernel pages are much bigger, so we don't care
                 */
-               if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci),
+               if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &chip->pci->dev,
                                        PAGE_ALIGN(VIA_TABLE_SIZE * 2 * 8),
                                        &dev->table) < 0)
                        return -ENOMEM;
@@ -850,7 +850,7 @@ static int snd_via686_pcm_new(struct via82xx_modem *chip)
        init_viadev(chip, 1, VIA_REG_MI_STATUS, 1);
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV_SG,
-                                             snd_dma_pci_data(chip->pci),
+                                             &chip->pci->dev,
                                              64*1024, 128*1024);
        return 0;
 }
index 90400ebb64af139426847aa2495a8809d06038da..125c11ed5064a0b8012ddf078cfd2c55b2c5e3cb 100644 (file)
@@ -587,7 +587,7 @@ static void snd_ymfpci_pcm_init_voice(struct snd_ymfpci_pcm *ypcm, unsigned int
 
 static int snd_ymfpci_ac3_init(struct snd_ymfpci *chip)
 {
-       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci),
+       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &chip->pci->dev,
                                4096, &chip->ac3_tmp_base) < 0)
                return -ENOMEM;
 
@@ -1149,7 +1149,8 @@ int snd_ymfpci_pcm(struct snd_ymfpci *chip, int device)
        chip->pcm = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->pci), 64*1024, 256*1024);
+                                             &chip->pci->dev,
+                                             64*1024, 256*1024);
 
        return snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK,
                                     snd_pcm_std_chmaps, 2, 0, NULL);
@@ -1184,7 +1185,8 @@ int snd_ymfpci_pcm2(struct snd_ymfpci *chip, int device)
        chip->pcm2 = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->pci), 64*1024, 256*1024);
+                                             &chip->pci->dev,
+                                             64*1024, 256*1024);
 
        return 0;
 }
@@ -1217,7 +1219,8 @@ int snd_ymfpci_pcm_spdif(struct snd_ymfpci *chip, int device)
        chip->pcm_spdif = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->pci), 64*1024, 256*1024);
+                                             &chip->pci->dev,
+                                             64*1024, 256*1024);
 
        return 0;
 }
@@ -1258,7 +1261,8 @@ int snd_ymfpci_pcm_4ch(struct snd_ymfpci *chip, int device)
        chip->pcm_4ch = pcm;
 
        snd_pcm_lib_preallocate_pages_for_all(pcm, SNDRV_DMA_TYPE_DEV,
-                                             snd_dma_pci_data(chip->pci), 64*1024, 256*1024);
+                                             &chip->pci->dev,
+                                             64*1024, 256*1024);
 
        return snd_pcm_add_chmap_ctls(pcm, SNDRV_PCM_STREAM_PLAYBACK,
                                     surround_map, 2, 0, NULL);
@@ -2108,7 +2112,7 @@ static int snd_ymfpci_memalloc(struct snd_ymfpci *chip)
               chip->work_size;
        /* work_ptr must be aligned to 256 bytes, but it's already
           covered with the kernel page allocation mechanism */
-       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, snd_dma_pci_data(chip->pci),
+       if (snd_dma_alloc_pages(SNDRV_DMA_TYPE_DEV, &chip->pci->dev,
                                size, &chip->work_ptr) < 0) 
                return -ENOMEM;
        ptr = chip->work_ptr.area;