cx88: use pci_set_dma_mask insted of pci_dma_supported
authorChristoph Hellwig <hch@lst.de>
Tue, 10 Nov 2015 22:45:28 +0000 (14:45 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 11 Nov 2015 00:32:11 +0000 (16:32 -0800)
This ensures the dma mask that is supported by the driver is recorded
in the device structure.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Cc: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/media/pci/cx88/cx88-alsa.c
drivers/media/pci/cx88/cx88-mpeg.c
drivers/media/pci/cx88/cx88-video.c

index 57ddf8a34178dcb5c9884c9bff61b4c9a1cf5a90..0ed1b65303746d3b5129997dc37dd00cbe784716 100644 (file)
@@ -890,7 +890,7 @@ static int snd_cx88_create(struct snd_card *card, struct pci_dev *pci,
                return err;
        }
 
-       if (!pci_dma_supported(pci,DMA_BIT_MASK(32))) {
+       if (!pci_set_dma_mask(pci,DMA_BIT_MASK(32))) {
                dprintk(0, "%s/1: Oops: no 32bit PCI DMA ???\n",core->name);
                err = -EIO;
                cx88_core_put(core, pci);
index 9961b2232b97fd42eaef0e2fffa16de06cad99d1..9db7767d1fe03eaad3244993d193f1045cb5f92b 100644 (file)
@@ -393,7 +393,7 @@ static int cx8802_init_common(struct cx8802_dev *dev)
        if (pci_enable_device(dev->pci))
                return -EIO;
        pci_set_master(dev->pci);
-       if (!pci_dma_supported(dev->pci,DMA_BIT_MASK(32))) {
+       if (!pci_set_dma_mask(dev->pci,DMA_BIT_MASK(32))) {
                printk("%s/2: Oops: no 32bit PCI DMA ???\n",dev->core->name);
                return -EIO;
        }
index f3b12dbbe9a18bfd605251a46d01cb163fec2dfa..0de1ad5a977d4d7b629819bb2d0ee0fb54539bb3 100644 (file)
@@ -1314,7 +1314,7 @@ static int cx8800_initdev(struct pci_dev *pci_dev,
               dev->pci_lat,(unsigned long long)pci_resource_start(pci_dev,0));
 
        pci_set_master(pci_dev);
-       if (!pci_dma_supported(pci_dev,DMA_BIT_MASK(32))) {
+       if (!pci_set_dma_mask(pci_dev,DMA_BIT_MASK(32))) {
                printk("%s/0: Oops: no 32bit PCI DMA ???\n",core->name);
                err = -EIO;
                goto fail_core;