patch-2.4.22 linux-2.4.22/arch/mips/kernel/pci-dma.c

Next file: linux-2.4.22/arch/mips/kernel/pci.c
Previous file: linux-2.4.22/arch/mips/kernel/old-time.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.21/arch/mips/kernel/pci-dma.c linux-2.4.22/arch/mips/kernel/pci-dma.c
@@ -21,6 +21,7 @@
 {
 	void *ret;
 	int gfp = GFP_ATOMIC;
+	struct pci_bus *bus = NULL;
 
 #ifdef CONFIG_ISA
 	if (hwdev == NULL || hwdev->dma_mask != 0xffffffff)
@@ -30,7 +31,9 @@
 
 	if (ret != NULL) {
 		memset(ret, 0, size);
-		*dma_handle = bus_to_baddr(hwdev->bus->number, __pa(ret));
+		if (hwdev)
+			bus = hwdev->bus;
+		*dma_handle = bus_to_baddr(bus, __pa(ret));
 #ifdef CONFIG_NONCOHERENT_IO
 		dma_cache_wback_inv((unsigned long) ret, size);
 		ret = UNCAC_ADDR(ret);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)