aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2009-06-04 14:29:54 -0400
committerGreg Kroah-Hartman <gregkh@suse.de>2009-06-19 14:00:55 -0400
commit602bd07313f6b337b7ec0297855a5d4d1743c6f2 (patch)
treeadd1e113adb0340eba834cdae1a06fd2e3d6e4ba /drivers/staging
parent24f5063d3f1125a75cadacab4609a358c15a96f3 (diff)
Staging: altpciechdma: fix build warnings
This fixes some build warnings in the altpciechdma driver. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging')
-rw-r--r--drivers/staging/altpciechdma/altpciechdma.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/drivers/staging/altpciechdma/altpciechdma.c b/drivers/staging/altpciechdma/altpciechdma.c
index ac9728e067d..3724b8ad487 100644
--- a/drivers/staging/altpciechdma/altpciechdma.c
+++ b/drivers/staging/altpciechdma/altpciechdma.c
@@ -399,6 +399,7 @@ static inline void ape_chdma_desc_set(struct ape_chdma_desc *desc, dma_addr_t ad
399 desc->rc_addr_l = cpu_to_le32(pci_dma_l(addr)); 399 desc->rc_addr_l = cpu_to_le32(pci_dma_l(addr));
400} 400}
401 401
402#if ALTPCIECHDMA_CDEV
402/* 403/*
403 * ape_sg_to_chdma_table() - Create a device descriptor table from a scatterlist. 404 * ape_sg_to_chdma_table() - Create a device descriptor table from a scatterlist.
404 * 405 *
@@ -456,6 +457,7 @@ static int ape_sg_to_chdma_table(struct scatterlist *sgl, int nents, int first,
456 j++; 457 j++;
457 return j; 458 return j;
458} 459}
460#endif
459 461
460/* compare buffers */ 462/* compare buffers */
461static inline int compare(u32 *p, u32 *q, int len) 463static inline int compare(u32 *p, u32 *q, int len)
@@ -540,8 +542,8 @@ static int __devinit dma_test(struct ape_dev *ape, struct pci_dev *dev)
540 printk(KERN_DEBUG "Could not allocate coherent DMA buffer.\n"); 542 printk(KERN_DEBUG "Could not allocate coherent DMA buffer.\n");
541 goto fail; 543 goto fail;
542 } 544 }
543 printk(KERN_DEBUG "Allocated cache-coherent DMA buffer (virtual address = 0x%016llx, bus address = 0x%016llx).\n", 545 printk(KERN_DEBUG "Allocated cache-coherent DMA buffer (virtual address = %p, bus address = 0x%016llx).\n",
544 (u64)buffer_virt, (u64)buffer_bus); 546 buffer_virt, (u64)buffer_bus);
545 547
546 /* fill first half of buffer with its virtual address as data */ 548 /* fill first half of buffer with its virtual address as data */
547 for (i = 0; i < 4 * PAGE_SIZE; i += 4) 549 for (i = 0; i < 4 * PAGE_SIZE; i += 4)
@@ -801,8 +803,8 @@ static int __devinit probe(struct pci_dev *dev, const struct pci_device_id *id)
801 goto err_table; 803 goto err_table;
802 } 804 }
803 805
804 printk(KERN_DEBUG "table_virt = 0x%16llx, table_bus = 0x%16llx.\n", 806 printk(KERN_DEBUG "table_virt = %p, table_bus = 0x%16llx.\n",
805 (u64)ape->table_virt, (u64)ape->table_bus); 807 ape->table_virt, (u64)ape->table_bus);
806 808
807 /* enable device */ 809 /* enable device */
808 rc = pci_enable_device(dev); 810 rc = pci_enable_device(dev);
@@ -913,9 +915,11 @@ static int __devinit probe(struct pci_dev *dev, const struct pci_device_id *id)
913 rc = 0; 915 rc = 0;
914 printk(KERN_DEBUG "probe() successful.\n"); 916 printk(KERN_DEBUG "probe() successful.\n");
915 goto end; 917 goto end;
918#if ALTPCIECHDMA_CDEV
916err_cdev: 919err_cdev:
917 /* unmap the BARs */ 920 /* unmap the BARs */
918 unmap_bars(ape, dev); 921 unmap_bars(ape, dev);
922#endif
919err_map: 923err_map:
920 /* free allocated irq */ 924 /* free allocated irq */
921 if (ape->irq_line >= 0) 925 if (ape->irq_line >= 0)
@@ -930,7 +934,7 @@ err_irq:
930 pci_release_regions(dev); 934 pci_release_regions(dev);
931err_mask: 935err_mask:
932err_regions: 936err_regions:
933err_rev: 937/*err_rev:*/
934/* clean up everything before device enable() */ 938/* clean up everything before device enable() */
935err_enable: 939err_enable:
936 if (ape->table_virt) 940 if (ape->table_virt)