Commit 91096a17 authored by David S. Miller's avatar David S. Miller

[DMA]: Fix example code in DMA-mapping.txt

Spotted by Jack Spaar <jspaar@myrealbox.com>
Signed-off-by: default avatarDavid S. Miller <davem@redhat.com>
parent 2ddb7fba
...@@ -222,14 +222,14 @@ Here is pseudo-code showing how this might be done: ...@@ -222,14 +222,14 @@ Here is pseudo-code showing how this might be done:
struct pci_dev *pdev; struct pci_dev *pdev;
... ...
if (pci_set_dma_mask(pdev, PLAYBACK_ADDRESS_BITS)) { if (!pci_set_dma_mask(pdev, PLAYBACK_ADDRESS_BITS)) {
card->playback_enabled = 1; card->playback_enabled = 1;
} else { } else {
card->playback_enabled = 0; card->playback_enabled = 0;
printk(KERN_WARN "%s: Playback disabled due to DMA limitations.\n", printk(KERN_WARN "%s: Playback disabled due to DMA limitations.\n",
card->name); card->name);
} }
if (pci_set_dma_mask(pdev, RECORD_ADDRESS_BITS)) { if (!pci_set_dma_mask(pdev, RECORD_ADDRESS_BITS)) {
card->record_enabled = 1; card->record_enabled = 1;
} else { } else {
card->record_enabled = 0; card->record_enabled = 0;
......
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