diff options
| author | David S. Miller <[email protected]> | 2010-01-04 23:33:22 +0000 |
|---|---|---|
| committer | David S. Miller <[email protected]> | 2010-01-04 23:33:22 +0000 |
| commit | 5958eed76ccc8c361f872829bdc4b8c6dc9cd379 (patch) | |
| tree | 8f8dfcced082db674b0ae3ca3af9fdb6dde59dae /lib/dma-debug.c | |
| parent | bbc_envctrl: Clean up properly if kthread_run() fails. (diff) | |
| parent | Merge branch 'limits_cleanup' of git://decibel.fi.muni.cz/~xslaby/linux (diff) | |
| download | kernel-5958eed76ccc8c361f872829bdc4b8c6dc9cd379.tar.gz kernel-5958eed76ccc8c361f872829bdc4b8c6dc9cd379.zip | |
Merge branch 'master' of /home/davem/src/GIT/linux-2.6/
Diffstat (limited to 'lib/dma-debug.c')
| -rw-r--r-- | lib/dma-debug.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c index d9b08e0f7f55..cf906201aecf 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c @@ -670,12 +670,13 @@ static int device_dma_allocations(struct device *dev) return count; } -static int dma_debug_device_change(struct notifier_block *nb, - unsigned long action, void *data) +static int dma_debug_device_change(struct notifier_block *nb, unsigned long action, void *data) { struct device *dev = data; int count; + if (global_disable) + return 0; switch (action) { case BUS_NOTIFY_UNBOUND_DRIVER: @@ -697,6 +698,9 @@ void dma_debug_add_bus(struct bus_type *bus) { struct notifier_block *nb; + if (global_disable) + return; + nb = kzalloc(sizeof(struct notifier_block), GFP_KERNEL); if (nb == NULL) { pr_err("dma_debug_add_bus: out of memory\n"); |
