From 2e17c5508fa015f2c7690e29041f437e9308c64f Mon Sep 17 00:00:00 2001 From: David Brownell Date: Tue, 8 May 2007 00:25:29 -0700 Subject: 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 Cc: Adam Belay Cc: Jaroslav Kysela Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- drivers/pnp/core.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'drivers') diff --git a/drivers/pnp/core.c b/drivers/pnp/core.c index aec83ec5ea2..d8d75541552 100644 --- a/drivers/pnp/core.c +++ b/drivers/pnp/core.c @@ -14,6 +14,7 @@ #include #include #include +#include #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); -- cgit v1.2.3