aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/sis7019.c
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/sis7019.c
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/sis7019.c')
-rw-r--r--sound/pci/sis7019.c10
1 files changed, 5 insertions, 5 deletions
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;