patch-2.4.22 linux-2.4.22/arch/mips64/kernel/pci-dma.c
Next file: linux-2.4.22/arch/mips64/kernel/proc.c
Previous file: linux-2.4.22/arch/mips64/kernel/mips64_ksyms.c
Back to the patch index
Back to the overall index
- Lines: 19
- Date:
2003-08-25 04:44:40.000000000 -0700
- Orig file:
linux-2.4.21/arch/mips64/kernel/pci-dma.c
- Orig date:
2002-11-28 15:53:10.000000000 -0800
diff -urN linux-2.4.21/arch/mips64/kernel/pci-dma.c linux-2.4.22/arch/mips64/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)