ALSA: pci: Avoid non-standard macro usage
[linux-2.6-block.git] / sound / pci / atiixp.c
index 169763c88f5e2b47d40a0a9895e948a7be871336..1e1ededf8eb241caa47ab402ff7293c712c16446 100644 (file)
@@ -1,22 +1,8 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
 /*
  *   ALSA driver for ATI IXP 150/200/250/300 AC97 controllers
  *
  *     Copyright (c) 2004 Takashi Iwai <tiwai@suse.de>
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *
- *   This program is distributed in the hope that it will be useful,
- *   but WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- *   GNU General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
- *
  */
 
 #include <linux/io.h>
@@ -367,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;
@@ -1298,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,
@@ -1331,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 */