Commit 97a34eb7 authored by Matti Linnanvuori's avatar Matti Linnanvuori Committed by Jesse Barnes

doc: fix an incorrect suggestion to pass NULL for PCI like buses

Fix an incorrect suggestion to pass NULL to pci_alloc_consistent
for PCI like buses where devices don't have struct pci_dev (like ISA, EISA).
Signed-off-by: default avatarMatti Linnanvuori <mattilinnanvuori@yahoo.com>
Acked-by: default avatarMatthew Wilcox <willy@linux.intel.com>
Signed-off-by: default avatarJesse Barnes <jbarnes@hobbes.lan>
parent 819e3237
...@@ -317,9 +317,9 @@ you should do: ...@@ -317,9 +317,9 @@ you should do:
cpu_addr = pci_alloc_consistent(pdev, size, &dma_handle); cpu_addr = pci_alloc_consistent(pdev, size, &dma_handle);
where pdev is a struct pci_dev *. You should pass NULL for PCI like buses where pdev is a struct pci_dev *. This may be called in interrupt context.
where devices don't have struct pci_dev (like ISA, EISA). This may be You should use dma_alloc_coherent (see DMA-API.txt) for buses
called in interrupt context. where devices don't have struct pci_dev (like ISA, EISA).
This argument is needed because the DMA translations may be bus This argument is needed because the DMA translations may be bus
specific (and often is private to the bus which the device is attached specific (and often is private to the bus which the device is attached
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment