mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
init dma masks in pnp_dev
PNP now initializes device dma masks, which prevents oopses when generic dma calls are made using pnp device nodes. This assumes PNP only uses ISA DMA, with 24 bit addresses; and that it's safe to init those masks for all devices (rather than finding out which devices have been assigned DMA channels, and handling only those). Signed-off-by: David Brownell <[email protected]> Cc: Adam Belay <[email protected]> Cc: Jaroslav Kysela <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>
This commit is contained in:
parent
6f8bc500a1
commit
2e17c5508f
2 changed files with 4 additions and 0 deletions
|
|
@ -14,6 +14,7 @@
|
|||
#include <linux/string.h>
|
||||
#include <linux/slab.h>
|
||||
#include <linux/errno.h>
|
||||
#include <linux/dma-mapping.h>
|
||||
|
||||
#include "base.h"
|
||||
|
||||
|
|
@ -114,6 +115,8 @@ int __pnp_add_device(struct pnp_dev *dev)
|
|||
int ret;
|
||||
pnp_fixup_device(dev);
|
||||
dev->dev.bus = &pnp_bus_type;
|
||||
dev->dev.dma_mask = &dev->dma_mask;
|
||||
dev->dma_mask = dev->dev.coherent_dma_mask = DMA_24BIT_MASK;
|
||||
dev->dev.release = &pnp_release_device;
|
||||
dev->status = PNP_READY;
|
||||
spin_lock(&pnp_lock);
|
||||
|
|
|
|||
Loading…
Reference in a new issue