aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci
diff options
context:
space:
mode:
authorQuentin Lambert <lambert.quentin@gmail.com>2015-04-15 10:10:17 -0400
committerTakashi Iwai <tiwai@suse.de>2015-04-16 06:19:52 -0400
commit412b979ccceff448dccea54bdb616c85781bc0ba (patch)
tree5a2f04e40cbfd679652a5ff3f07353c4aa9a1459 /sound/pci
parent3047755588e71b67c3f60409686fabf8506357e9 (diff)
ALSA: remove deprecated use of pci api
Replace occurences of the pci api by appropriate call to the dma api. A simplified version of the semantic patch that finds this problem is as follows: (http://coccinelle.lip6.fr) @deprecated@ idexpression id; position p; @@ ( pci_dma_supported@p ( id, ...) | pci_alloc_consistent@p ( id, ...) ) @bad1@ idexpression id; position deprecated.p; @@ ...when != &id->dev when != pci_get_drvdata ( id ) when != pci_enable_device ( id ) ( pci_dma_supported@p ( id, ...) | pci_alloc_consistent@p ( id, ...) ) @depends on !bad1@ idexpression id; expression direction; position deprecated.p; @@ ( - pci_dma_supported@p ( id, + dma_supported ( &id->dev, ... + , GFP_ATOMIC ) | - pci_alloc_consistent@p ( id, + dma_alloc_coherent ( &id->dev, ... + , GFP_ATOMIC ) ) Signed-off-by: Quentin Lambert <lambert.quentin@gmail.com> Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci')
-rw-r--r--sound/pci/ad1889.c4
-rw-r--r--sound/pci/ali5451/ali5451.c4
-rw-r--r--sound/pci/als300.c4
-rw-r--r--sound/pci/als4000.c4
-rw-r--r--sound/pci/au88x0/au88x0.c4
-rw-r--r--sound/pci/aw2/aw2-alsa.c4
-rw-r--r--sound/pci/azt3328.c4
-rw-r--r--sound/pci/ca0106/ca0106_main.c4
-rw-r--r--sound/pci/cs5535audio/cs5535audio.c4
-rw-r--r--sound/pci/ctxfi/cthw20k1.c4
-rw-r--r--sound/pci/ctxfi/cthw20k2.c4
-rw-r--r--sound/pci/emu10k1/emu10k1_main.c4
-rw-r--r--sound/pci/es1938.c4
-rw-r--r--sound/pci/es1968.c4
-rw-r--r--sound/pci/hda/hda_intel.c8
-rw-r--r--sound/pci/ice1712/ice1712.c4
-rw-r--r--sound/pci/lx6464es/lx6464es.c2
-rw-r--r--sound/pci/maestro3.c4
-rw-r--r--sound/pci/mixart/mixart.c2
-rw-r--r--sound/pci/pcxhr/pcxhr.c2
-rw-r--r--sound/pci/sis7019.c10
-rw-r--r--sound/pci/sonicvibes.c4
-rw-r--r--sound/pci/trident/trident_main.c4
23 files changed, 48 insertions, 48 deletions
diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c
index 66ddd981d1d5..1fc6d8bc09e5 100644
--- a/sound/pci/ad1889.c
+++ b/sound/pci/ad1889.c
@@ -898,8 +898,8 @@ snd_ad1889_create(struct snd_card *card,
898 return err; 898 return err;
899 899
900 /* check PCI availability (32bit DMA) */ 900 /* check PCI availability (32bit DMA) */
901 if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0 || 901 if (dma_set_mask(&pci->dev, DMA_BIT_MASK(32)) < 0 ||
902 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0) { 902 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(32)) < 0) {
903 dev_err(card->dev, "error setting 32-bit DMA mask.\n"); 903 dev_err(card->dev, "error setting 32-bit DMA mask.\n");
904 pci_disable_device(pci); 904 pci_disable_device(pci);
905 return -ENXIO; 905 return -ENXIO;
diff --git a/sound/pci/ali5451/ali5451.c b/sound/pci/ali5451/ali5451.c
index c8d499575c01..36470af7eda7 100644
--- a/sound/pci/ali5451/ali5451.c
+++ b/sound/pci/ali5451/ali5451.c
@@ -2105,8 +2105,8 @@ static int snd_ali_create(struct snd_card *card,
2105 if (err < 0) 2105 if (err < 0)
2106 return err; 2106 return err;
2107 /* check, if we can restrict PCI DMA transfers to 31 bits */ 2107 /* check, if we can restrict PCI DMA transfers to 31 bits */
2108 if (pci_set_dma_mask(pci, DMA_BIT_MASK(31)) < 0 || 2108 if (dma_set_mask(&pci->dev, DMA_BIT_MASK(31)) < 0 ||
2109 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(31)) < 0) { 2109 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(31)) < 0) {
2110 dev_err(card->dev, 2110 dev_err(card->dev,
2111 "architecture does not support 31bit PCI busmaster DMA\n"); 2111 "architecture does not support 31bit PCI busmaster DMA\n");
2112 pci_disable_device(pci); 2112 pci_disable_device(pci);
diff --git a/sound/pci/als300.c b/sound/pci/als300.c
index 57e034f208dc..add3176398d3 100644
--- a/sound/pci/als300.c
+++ b/sound/pci/als300.c
@@ -658,8 +658,8 @@ static int snd_als300_create(struct snd_card *card,
658 if ((err = pci_enable_device(pci)) < 0) 658 if ((err = pci_enable_device(pci)) < 0)
659 return err; 659 return err;
660 660
661 if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 || 661 if (dma_set_mask(&pci->dev, DMA_BIT_MASK(28)) < 0 ||
662 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) { 662 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(28)) < 0) {
663 dev_err(card->dev, "error setting 28bit DMA mask\n"); 663 dev_err(card->dev, "error setting 28bit DMA mask\n");
664 pci_disable_device(pci); 664 pci_disable_device(pci);
665 return -ENXIO; 665 return -ENXIO;
diff --git a/sound/pci/als4000.c b/sound/pci/als4000.c
index a3dea464134d..ff39a0c7277b 100644
--- a/sound/pci/als4000.c
+++ b/sound/pci/als4000.c
@@ -871,8 +871,8 @@ static int snd_card_als4000_probe(struct pci_dev *pci,
871 return err; 871 return err;
872 } 872 }
873 /* check, if we can restrict PCI DMA transfers to 24 bits */ 873 /* check, if we can restrict PCI DMA transfers to 24 bits */
874 if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 || 874 if (dma_set_mask(&pci->dev, DMA_BIT_MASK(24)) < 0 ||
875 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) { 875 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(24)) < 0) {
876 dev_err(&pci->dev, "architecture does not support 24bit PCI busmaster DMA\n"); 876 dev_err(&pci->dev, "architecture does not support 24bit PCI busmaster DMA\n");
877 pci_disable_device(pci); 877 pci_disable_device(pci);
878 return -ENXIO; 878 return -ENXIO;
diff --git a/sound/pci/au88x0/au88x0.c b/sound/pci/au88x0/au88x0.c
index 996369134ea8..32092184bbf2 100644
--- a/sound/pci/au88x0/au88x0.c
+++ b/sound/pci/au88x0/au88x0.c
@@ -150,8 +150,8 @@ snd_vortex_create(struct snd_card *card, struct pci_dev *pci, vortex_t ** rchip)
150 // check PCI availability (DMA). 150 // check PCI availability (DMA).
151 if ((err = pci_enable_device(pci)) < 0) 151 if ((err = pci_enable_device(pci)) < 0)
152 return err; 152 return err;
153 if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0 || 153 if (dma_set_mask(&pci->dev, DMA_BIT_MASK(32)) < 0 ||
154 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0) { 154 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(32)) < 0) {
155 dev_err(card->dev, "error to set DMA mask\n"); 155 dev_err(card->dev, "error to set DMA mask\n");
156 pci_disable_device(pci); 156 pci_disable_device(pci);
157 return -ENXIO; 157 return -ENXIO;
diff --git a/sound/pci/aw2/aw2-alsa.c b/sound/pci/aw2/aw2-alsa.c
index 8d2fee7b33bd..167714303070 100644
--- a/sound/pci/aw2/aw2-alsa.c
+++ b/sound/pci/aw2/aw2-alsa.c
@@ -258,8 +258,8 @@ static int snd_aw2_create(struct snd_card *card,
258 pci_set_master(pci); 258 pci_set_master(pci);
259 259
260 /* check PCI availability (32bit DMA) */ 260 /* check PCI availability (32bit DMA) */
261 if ((pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0) || 261 if ((dma_set_mask(&pci->dev, DMA_BIT_MASK(32)) < 0) ||
262 (pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0)) { 262 (dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(32)) < 0)) {
263 dev_err(card->dev, "Impossible to set 32bit mask DMA\n"); 263 dev_err(card->dev, "Impossible to set 32bit mask DMA\n");
264 pci_disable_device(pci); 264 pci_disable_device(pci);
265 return -ENXIO; 265 return -ENXIO;
diff --git a/sound/pci/azt3328.c b/sound/pci/azt3328.c
index 33b2a0af1b59..07a4acc99541 100644
--- a/sound/pci/azt3328.c
+++ b/sound/pci/azt3328.c
@@ -2420,8 +2420,8 @@ snd_azf3328_create(struct snd_card *card,
2420 chip->irq = -1; 2420 chip->irq = -1;
2421 2421
2422 /* check if we can restrict PCI DMA transfers to 24 bits */ 2422 /* check if we can restrict PCI DMA transfers to 24 bits */
2423 if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 || 2423 if (dma_set_mask(&pci->dev, DMA_BIT_MASK(24)) < 0 ||
2424 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) { 2424 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(24)) < 0) {
2425 dev_err(card->dev, 2425 dev_err(card->dev,
2426 "architecture does not support 24bit PCI busmaster DMA\n" 2426 "architecture does not support 24bit PCI busmaster DMA\n"
2427 ); 2427 );
diff --git a/sound/pci/ca0106/ca0106_main.c b/sound/pci/ca0106/ca0106_main.c
index dd75b7536fa2..0b31732eb4dc 100644
--- a/sound/pci/ca0106/ca0106_main.c
+++ b/sound/pci/ca0106/ca0106_main.c
@@ -1676,8 +1676,8 @@ static int snd_ca0106_create(int dev, struct snd_card *card,
1676 err = pci_enable_device(pci); 1676 err = pci_enable_device(pci);
1677 if (err < 0) 1677 if (err < 0)
1678 return err; 1678 return err;
1679 if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0 || 1679 if (dma_set_mask(&pci->dev, DMA_BIT_MASK(32)) < 0 ||
1680 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0) { 1680 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(32)) < 0) {
1681 dev_err(card->dev, "error to set 32bit mask DMA\n"); 1681 dev_err(card->dev, "error to set 32bit mask DMA\n");
1682 pci_disable_device(pci); 1682 pci_disable_device(pci);
1683 return -ENXIO; 1683 return -ENXIO;
diff --git a/sound/pci/cs5535audio/cs5535audio.c b/sound/pci/cs5535audio/cs5535audio.c
index 963b912550d4..de409cda50aa 100644
--- a/sound/pci/cs5535audio/cs5535audio.c
+++ b/sound/pci/cs5535audio/cs5535audio.c
@@ -289,8 +289,8 @@ static int snd_cs5535audio_create(struct snd_card *card,
289 if ((err = pci_enable_device(pci)) < 0) 289 if ((err = pci_enable_device(pci)) < 0)
290 return err; 290 return err;
291 291
292 if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0 || 292 if (dma_set_mask(&pci->dev, DMA_BIT_MASK(32)) < 0 ||
293 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)) < 0) { 293 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(32)) < 0) {
294 dev_warn(card->dev, "unable to get 32bit dma\n"); 294 dev_warn(card->dev, "unable to get 32bit dma\n");
295 err = -ENXIO; 295 err = -ENXIO;
296 goto pcifail; 296 goto pcifail;
diff --git a/sound/pci/ctxfi/cthw20k1.c b/sound/pci/ctxfi/cthw20k1.c
index 1cac55fd1139..9667cbfb0ca2 100644
--- a/sound/pci/ctxfi/cthw20k1.c
+++ b/sound/pci/ctxfi/cthw20k1.c
@@ -1910,8 +1910,8 @@ static int hw_card_start(struct hw *hw)
1910 return err; 1910 return err;
1911 1911
1912 /* Set DMA transfer mask */ 1912 /* Set DMA transfer mask */
1913 if (pci_set_dma_mask(pci, CT_XFI_DMA_MASK) < 0 || 1913 if (dma_set_mask(&pci->dev, CT_XFI_DMA_MASK) < 0 ||
1914 pci_set_consistent_dma_mask(pci, CT_XFI_DMA_MASK) < 0) { 1914 dma_set_coherent_mask(&pci->dev, CT_XFI_DMA_MASK) < 0) {
1915 dev_err(hw->card->dev, 1915 dev_err(hw->card->dev,
1916 "architecture does not support PCI busmaster DMA with mask 0x%llx\n", 1916 "architecture does not support PCI busmaster DMA with mask 0x%llx\n",
1917 CT_XFI_DMA_MASK); 1917 CT_XFI_DMA_MASK);
diff --git a/sound/pci/ctxfi/cthw20k2.c b/sound/pci/ctxfi/cthw20k2.c
index 955ad871e9a8..9dc2950e1ab7 100644
--- a/sound/pci/ctxfi/cthw20k2.c
+++ b/sound/pci/ctxfi/cthw20k2.c
@@ -2035,8 +2035,8 @@ static int hw_card_start(struct hw *hw)
2035 return err; 2035 return err;
2036 2036
2037 /* Set DMA transfer mask */ 2037 /* Set DMA transfer mask */
2038 if (pci_set_dma_mask(pci, CT_XFI_DMA_MASK) < 0 || 2038 if (dma_set_mask(&pci->dev, CT_XFI_DMA_MASK) < 0 ||
2039 pci_set_consistent_dma_mask(pci, CT_XFI_DMA_MASK) < 0) { 2039 dma_set_coherent_mask(&pci->dev, CT_XFI_DMA_MASK) < 0) {
2040 dev_err(hw->card->dev, 2040 dev_err(hw->card->dev,
2041 "architecture does not support PCI busmaster DMA with mask 0x%llx\n", 2041 "architecture does not support PCI busmaster DMA with mask 0x%llx\n",
2042 CT_XFI_DMA_MASK); 2042 CT_XFI_DMA_MASK);
diff --git a/sound/pci/emu10k1/emu10k1_main.c b/sound/pci/emu10k1/emu10k1_main.c
index 54079f5d5673..e66103ad9a21 100644
--- a/sound/pci/emu10k1/emu10k1_main.c
+++ b/sound/pci/emu10k1/emu10k1_main.c
@@ -1904,8 +1904,8 @@ int snd_emu10k1_create(struct snd_card *card,
1904 1904
1905 /* set the DMA transfer mask */ 1905 /* set the DMA transfer mask */
1906 emu->dma_mask = is_audigy ? AUDIGY_DMA_MASK : EMU10K1_DMA_MASK; 1906 emu->dma_mask = is_audigy ? AUDIGY_DMA_MASK : EMU10K1_DMA_MASK;
1907 if (pci_set_dma_mask(pci, emu->dma_mask) < 0 || 1907 if (dma_set_mask(&pci->dev, emu->dma_mask) < 0 ||
1908 pci_set_consistent_dma_mask(pci, emu->dma_mask) < 0) { 1908 dma_set_coherent_mask(&pci->dev, emu->dma_mask) < 0) {
1909 dev_err(card->dev, 1909 dev_err(card->dev,
1910 "architecture does not support PCI busmaster DMA with mask 0x%lx\n", 1910 "architecture does not support PCI busmaster DMA with mask 0x%lx\n",
1911 emu->dma_mask); 1911 emu->dma_mask);
diff --git a/sound/pci/es1938.c b/sound/pci/es1938.c
index e1858d9d23d8..8963d7688fb0 100644
--- a/sound/pci/es1938.c
+++ b/sound/pci/es1938.c
@@ -1580,8 +1580,8 @@ static int snd_es1938_create(struct snd_card *card,
1580 if ((err = pci_enable_device(pci)) < 0) 1580 if ((err = pci_enable_device(pci)) < 0)
1581 return err; 1581 return err;
1582 /* check, if we can restrict PCI DMA transfers to 24 bits */ 1582 /* check, if we can restrict PCI DMA transfers to 24 bits */
1583 if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 || 1583 if (dma_set_mask(&pci->dev, DMA_BIT_MASK(24)) < 0 ||
1584 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) { 1584 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(24)) < 0) {
1585 dev_err(card->dev, 1585 dev_err(card->dev,
1586 "architecture does not support 24bit PCI busmaster DMA\n"); 1586 "architecture does not support 24bit PCI busmaster DMA\n");
1587 pci_disable_device(pci); 1587 pci_disable_device(pci);
diff --git a/sound/pci/es1968.c b/sound/pci/es1968.c
index 059f3846d7b8..e0d9363dc7fd 100644
--- a/sound/pci/es1968.c
+++ b/sound/pci/es1968.c
@@ -2689,8 +2689,8 @@ static int snd_es1968_create(struct snd_card *card,
2689 if ((err = pci_enable_device(pci)) < 0) 2689 if ((err = pci_enable_device(pci)) < 0)
2690 return err; 2690 return err;
2691 /* check, if we can restrict PCI DMA transfers to 28 bits */ 2691 /* check, if we can restrict PCI DMA transfers to 28 bits */
2692 if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 || 2692 if (dma_set_mask(&pci->dev, DMA_BIT_MASK(28)) < 0 ||
2693 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) { 2693 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(28)) < 0) {
2694 dev_err(card->dev, 2694 dev_err(card->dev,
2695 "architecture does not support 28bit PCI busmaster DMA\n"); 2695 "architecture does not support 28bit PCI busmaster DMA\n");
2696 pci_disable_device(pci); 2696 pci_disable_device(pci);
diff --git a/sound/pci/hda/hda_intel.c b/sound/pci/hda/hda_intel.c
index e1c210515581..626b5b20d2ae 100644
--- a/sound/pci/hda/hda_intel.c
+++ b/sound/pci/hda/hda_intel.c
@@ -1528,11 +1528,11 @@ static int azx_first_init(struct azx *chip)
1528 /* allow 64bit DMA address if supported by H/W */ 1528 /* allow 64bit DMA address if supported by H/W */
1529 if (!(gcap & AZX_GCAP_64OK)) 1529 if (!(gcap & AZX_GCAP_64OK))
1530 dma_bits = 32; 1530 dma_bits = 32;
1531 if (!pci_set_dma_mask(pci, DMA_BIT_MASK(dma_bits))) { 1531 if (!dma_set_mask(&pci->dev, DMA_BIT_MASK(dma_bits))) {
1532 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(dma_bits)); 1532 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(dma_bits));
1533 } else { 1533 } else {
1534 pci_set_dma_mask(pci, DMA_BIT_MASK(32)); 1534 dma_set_mask(&pci->dev, DMA_BIT_MASK(32));
1535 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(32)); 1535 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(32));
1536 } 1536 }
1537 1537
1538 /* read number of streams from GCAP register instead of using 1538 /* read number of streams from GCAP register instead of using
diff --git a/sound/pci/ice1712/ice1712.c b/sound/pci/ice1712/ice1712.c
index f7b1523e8a82..8ae3bb7975d1 100644
--- a/sound/pci/ice1712/ice1712.c
+++ b/sound/pci/ice1712/ice1712.c
@@ -2530,8 +2530,8 @@ static int snd_ice1712_create(struct snd_card *card,
2530 if (err < 0) 2530 if (err < 0)
2531 return err; 2531 return err;
2532 /* check, if we can restrict PCI DMA transfers to 28 bits */ 2532 /* check, if we can restrict PCI DMA transfers to 28 bits */
2533 if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 || 2533 if (dma_set_mask(&pci->dev, DMA_BIT_MASK(28)) < 0 ||
2534 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) { 2534 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(28)) < 0) {
2535 dev_err(card->dev, 2535 dev_err(card->dev,
2536 "architecture does not support 28bit PCI busmaster DMA\n"); 2536 "architecture does not support 28bit PCI busmaster DMA\n");
2537 pci_disable_device(pci); 2537 pci_disable_device(pci);
diff --git a/sound/pci/lx6464es/lx6464es.c b/sound/pci/lx6464es/lx6464es.c
index 601315a1f58f..32c6f6ba1442 100644
--- a/sound/pci/lx6464es/lx6464es.c
+++ b/sound/pci/lx6464es/lx6464es.c
@@ -981,7 +981,7 @@ static int snd_lx6464es_create(struct snd_card *card,
981 pci_set_master(pci); 981 pci_set_master(pci);
982 982
983 /* check if we can restrict PCI DMA transfers to 32 bits */ 983 /* check if we can restrict PCI DMA transfers to 32 bits */
984 err = pci_set_dma_mask(pci, DMA_BIT_MASK(32)); 984 err = dma_set_mask(&pci->dev, DMA_BIT_MASK(32));
985 if (err < 0) { 985 if (err < 0) {
986 dev_err(card->dev, 986 dev_err(card->dev,
987 "architecture does not support 32bit PCI busmaster DMA\n"); 987 "architecture does not support 32bit PCI busmaster DMA\n");
diff --git a/sound/pci/maestro3.c b/sound/pci/maestro3.c
index 9be660993bd0..72e89cedc52d 100644
--- a/sound/pci/maestro3.c
+++ b/sound/pci/maestro3.c
@@ -2537,8 +2537,8 @@ snd_m3_create(struct snd_card *card, struct pci_dev *pci,
2537 return -EIO; 2537 return -EIO;
2538 2538
2539 /* check, if we can restrict PCI DMA transfers to 28 bits */ 2539 /* check, if we can restrict PCI DMA transfers to 28 bits */
2540 if (pci_set_dma_mask(pci, DMA_BIT_MASK(28)) < 0 || 2540 if (dma_set_mask(&pci->dev, DMA_BIT_MASK(28)) < 0 ||
2541 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(28)) < 0) { 2541 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(28)) < 0) {
2542 dev_err(card->dev, 2542 dev_err(card->dev,
2543 "architecture does not support 28bit PCI busmaster DMA\n"); 2543 "architecture does not support 28bit PCI busmaster DMA\n");
2544 pci_disable_device(pci); 2544 pci_disable_device(pci);
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c
index c3a9f39f8d61..bc81b9f75ed0 100644
--- a/sound/pci/mixart/mixart.c
+++ b/sound/pci/mixart/mixart.c
@@ -1269,7 +1269,7 @@ static int snd_mixart_probe(struct pci_dev *pci,
1269 pci_set_master(pci); 1269 pci_set_master(pci);
1270 1270
1271 /* check if we can restrict PCI DMA transfers to 32 bits */ 1271 /* check if we can restrict PCI DMA transfers to 32 bits */
1272 if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0) { 1272 if (dma_set_mask(&pci->dev, DMA_BIT_MASK(32)) < 0) {
1273 dev_err(&pci->dev, 1273 dev_err(&pci->dev,
1274 "architecture does not support 32bit PCI busmaster DMA\n"); 1274 "architecture does not support 32bit PCI busmaster DMA\n");
1275 pci_disable_device(pci); 1275 pci_disable_device(pci);
diff --git a/sound/pci/pcxhr/pcxhr.c b/sound/pci/pcxhr/pcxhr.c
index c6092e48ceb6..9293235281dc 100644
--- a/sound/pci/pcxhr/pcxhr.c
+++ b/sound/pci/pcxhr/pcxhr.c
@@ -1537,7 +1537,7 @@ static int pcxhr_probe(struct pci_dev *pci,
1537 pci_set_master(pci); 1537 pci_set_master(pci);
1538 1538
1539 /* check if we can restrict PCI DMA transfers to 32 bits */ 1539 /* check if we can restrict PCI DMA transfers to 32 bits */
1540 if (pci_set_dma_mask(pci, DMA_BIT_MASK(32)) < 0) { 1540 if (dma_set_mask(&pci->dev, DMA_BIT_MASK(32)) < 0) {
1541 dev_err(&pci->dev, 1541 dev_err(&pci->dev,
1542 "architecture does not support 32bit PCI busmaster DMA\n"); 1542 "architecture does not support 32bit PCI busmaster DMA\n");
1543 pci_disable_device(pci); 1543 pci_disable_device(pci);
diff --git a/sound/pci/sis7019.c b/sound/pci/sis7019.c
index efe669b80256..f3860b850210 100644
--- a/sound/pci/sis7019.c
+++ b/sound/pci/sis7019.c
@@ -383,9 +383,9 @@ static void __sis_map_silence(struct sis7019 *sis)
383{ 383{
384 /* Helper function: must hold sis->voice_lock on entry */ 384 /* Helper function: must hold sis->voice_lock on entry */
385 if (!sis->silence_users) 385 if (!sis->silence_users)
386 sis->silence_dma_addr = pci_map_single(sis->pci, 386 sis->silence_dma_addr = dma_map_single(&sis->pci->dev,
387 sis->suspend_state[0], 387 sis->suspend_state[0],
388 4096, PCI_DMA_TODEVICE); 388 4096, DMA_TO_DEVICE);
389 sis->silence_users++; 389 sis->silence_users++;
390} 390}
391 391
@@ -394,8 +394,8 @@ static void __sis_unmap_silence(struct sis7019 *sis)
394 /* Helper function: must hold sis->voice_lock on entry */ 394 /* Helper function: must hold sis->voice_lock on entry */
395 sis->silence_users--; 395 sis->silence_users--;
396 if (!sis->silence_users) 396 if (!sis->silence_users)
397 pci_unmap_single(sis->pci, sis->silence_dma_addr, 4096, 397 dma_unmap_single(&sis->pci->dev, sis->silence_dma_addr, 4096,
398 PCI_DMA_TODEVICE); 398 DMA_TO_DEVICE);
399} 399}
400 400
401static void sis_free_voice(struct sis7019 *sis, struct voice *voice) 401static void sis_free_voice(struct sis7019 *sis, struct voice *voice)
@@ -1325,7 +1325,7 @@ static int sis_chip_create(struct snd_card *card,
1325 if (rc) 1325 if (rc)
1326 goto error_out; 1326 goto error_out;
1327 1327
1328 rc = pci_set_dma_mask(pci, DMA_BIT_MASK(30)); 1328 rc = dma_set_mask(&pci->dev, DMA_BIT_MASK(30));
1329 if (rc < 0) { 1329 if (rc < 0) {
1330 dev_err(&pci->dev, "architecture does not support 30-bit PCI busmaster DMA"); 1330 dev_err(&pci->dev, "architecture does not support 30-bit PCI busmaster DMA");
1331 goto error_out_enabled; 1331 goto error_out_enabled;
diff --git a/sound/pci/sonicvibes.c b/sound/pci/sonicvibes.c
index 0f40624a4275..1b6fad7d4d56 100644
--- a/sound/pci/sonicvibes.c
+++ b/sound/pci/sonicvibes.c
@@ -1259,8 +1259,8 @@ static int snd_sonicvibes_create(struct snd_card *card,
1259 if ((err = pci_enable_device(pci)) < 0) 1259 if ((err = pci_enable_device(pci)) < 0)
1260 return err; 1260 return err;
1261 /* check, if we can restrict PCI DMA transfers to 24 bits */ 1261 /* check, if we can restrict PCI DMA transfers to 24 bits */
1262 if (pci_set_dma_mask(pci, DMA_BIT_MASK(24)) < 0 || 1262 if (dma_set_mask(&pci->dev, DMA_BIT_MASK(24)) < 0 ||
1263 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(24)) < 0) { 1263 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(24)) < 0) {
1264 dev_err(card->dev, 1264 dev_err(card->dev,
1265 "architecture does not support 24bit PCI busmaster DMA\n"); 1265 "architecture does not support 24bit PCI busmaster DMA\n");
1266 pci_disable_device(pci); 1266 pci_disable_device(pci);
diff --git a/sound/pci/trident/trident_main.c b/sound/pci/trident/trident_main.c
index b72be035f785..599d2b7eb5b8 100644
--- a/sound/pci/trident/trident_main.c
+++ b/sound/pci/trident/trident_main.c
@@ -3551,8 +3551,8 @@ int snd_trident_create(struct snd_card *card,
3551 if ((err = pci_enable_device(pci)) < 0) 3551 if ((err = pci_enable_device(pci)) < 0)
3552 return err; 3552 return err;
3553 /* check, if we can restrict PCI DMA transfers to 30 bits */ 3553 /* check, if we can restrict PCI DMA transfers to 30 bits */
3554 if (pci_set_dma_mask(pci, DMA_BIT_MASK(30)) < 0 || 3554 if (dma_set_mask(&pci->dev, DMA_BIT_MASK(30)) < 0 ||
3555 pci_set_consistent_dma_mask(pci, DMA_BIT_MASK(30)) < 0) { 3555 dma_set_coherent_mask(&pci->dev, DMA_BIT_MASK(30)) < 0) {
3556 dev_err(card->dev, 3556 dev_err(card->dev,
3557 "architecture does not support 30bit PCI busmaster DMA\n"); 3557 "architecture does not support 30bit PCI busmaster DMA\n");
3558 pci_disable_device(pci); 3558 pci_disable_device(pci);