]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/frv/include/asm/pci.h
asm-generic: merge branch 'master' of torvalds/linux-2.6
[karo-tx-linux.git] / arch / frv / include / asm / pci.h
index 3ce227ba7744faeb9ef0d7e5da453ee528e51afe..492b5c4dfed606d3004faf808b7a7270c3c94d0d 100644 (file)
@@ -81,8 +81,7 @@ static inline void pci_dma_sync_single(struct pci_dev *hwdev,
                                       dma_addr_t dma_handle,
                                       size_t size, int direction)
 {
-       if (direction == PCI_DMA_NONE)
-                BUG();
+       BUG_ON(direction == PCI_DMA_NONE);
 
        frv_cache_wback_inv((unsigned long)bus_to_virt(dma_handle),
                            (unsigned long)bus_to_virt(dma_handle) + size);
@@ -99,9 +98,7 @@ static inline void pci_dma_sync_sg(struct pci_dev *hwdev,
                                   int nelems, int direction)
 {
        int i;
-
-       if (direction == PCI_DMA_NONE)
-                BUG();
+       BUG_ON(direction == PCI_DMA_NONE);
 
        for (i = 0; i < nelems; i++)
                frv_cache_wback_inv(sg_dma_address(&sg[i]),