diff --git a/Documentation/DMA-mapping.txt b/Documentation/DMA-mapping.txt index 13a53cb878d479f728b590c7b4a19eab7651a4c1..f4ac37f157ea905e06e132c6ee5a1587cb05cbae 100644 --- a/Documentation/DMA-mapping.txt +++ b/Documentation/DMA-mapping.txt @@ -222,14 +222,14 @@ Here is pseudo-code showing how this might be done: 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; } else { card->playback_enabled = 0; printk(KERN_WARN "%s: Playback disabled due to DMA limitations.\n", card->name); } - if (pci_set_dma_mask(pdev, RECORD_ADDRESS_BITS)) { + if (!pci_set_dma_mask(pdev, RECORD_ADDRESS_BITS)) { card->record_enabled = 1; } else { card->record_enabled = 0; diff --git a/include/asm-sparc/openpromio.h b/include/asm-sparc/openpromio.h index 6e32823ab4e2753939815496293ad5e6aac0dbaf..917fb8e9c633826908d1751377034a3e1aa6a79e 100644 --- a/include/asm-sparc/openpromio.h +++ b/include/asm-sparc/openpromio.h @@ -1,6 +1,7 @@ #ifndef _SPARC_OPENPROMIO_H #define _SPARC_OPENPROMIO_H +#include <linux/compiler.h> #include <linux/ioctl.h> #include <linux/types.h> @@ -52,9 +53,9 @@ struct opiocdesc { int op_nodeid; /* PROM Node ID (value-result) */ int op_namelen; /* Length of op_name. */ - char *op_name; /* Pointer to the property name. */ + char __user *op_name; /* Pointer to the property name. */ int op_buflen; /* Length of op_buf (value-result) */ - char *op_buf; /* Pointer to buffer. */ + char __user *op_buf; /* Pointer to buffer. */ }; #define OPIOCGET _IOWR('O', 1, struct opiocdesc) diff --git a/include/asm-sparc64/openpromio.h b/include/asm-sparc64/openpromio.h index a5b88e9d99877cc941dc58659ad9b1b7ba276d13..847ce2326ad5fb93144105d1e154ff9868997d0f 100644 --- a/include/asm-sparc64/openpromio.h +++ b/include/asm-sparc64/openpromio.h @@ -1,6 +1,7 @@ #ifndef _SPARC64_OPENPROMIO_H #define _SPARC64_OPENPROMIO_H +#include <linux/compiler.h> #include <linux/ioctl.h> #include <linux/types.h>