diff options
author | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-21 20:42:20 +0200 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2008-10-21 20:42:20 +0200 |
commit | b876d08f816527af257e13d89fb0d3b4b849223c (patch) | |
tree | 40569f568230f918ca55f04b355e251747f913ed /drivers/dma/dmatest.c | |
parent | Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds... (diff) | |
parent | binfmt_elf_fdpic: Update for cputime changes. (diff) | |
download | linux-b876d08f816527af257e13d89fb0d3b4b849223c.tar.xz linux-b876d08f816527af257e13d89fb0d3b4b849223c.zip |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Conflicts:
drivers/pci/dmar.c
Diffstat (limited to 'drivers/dma/dmatest.c')
-rw-r--r-- | drivers/dma/dmatest.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/dma/dmatest.c b/drivers/dma/dmatest.c index a08d19704743..d1e381e35a9e 100644 --- a/drivers/dma/dmatest.c +++ b/drivers/dma/dmatest.c @@ -325,7 +325,12 @@ static enum dma_state_client dmatest_add_channel(struct dma_chan *chan) struct dmatest_thread *thread; unsigned int i; - dtc = kmalloc(sizeof(struct dmatest_chan), GFP_ATOMIC); + /* Have we already been told about this channel? */ + list_for_each_entry(dtc, &dmatest_channels, node) + if (dtc->chan == chan) + return DMA_DUP; + + dtc = kmalloc(sizeof(struct dmatest_chan), GFP_KERNEL); if (!dtc) { pr_warning("dmatest: No memory for %s\n", chan->dev.bus_id); return DMA_NAK; |