diff options
author | Jaroslav Kysela <perex@perex.cz> | 2010-01-08 03:26:34 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@perex.cz> | 2010-01-08 03:26:34 -0500 |
commit | 1cb4f624ea38361b6397966470f0a1bed5532483 (patch) | |
tree | 418b05ddc854b09d64f7d5ee0c78875e42b5f151 /lib/dma-debug.c | |
parent | 444c1953d496d272208902ff7010dc70d1f887f0 (diff) | |
parent | 2c1f1895ef2aa8f0e5497893eff71304aef332e1 (diff) |
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into fixes
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) | |||
670 | return count; | 670 | return count; |
671 | } | 671 | } |
672 | 672 | ||
673 | static int dma_debug_device_change(struct notifier_block *nb, | 673 | static int dma_debug_device_change(struct notifier_block *nb, unsigned long action, void *data) |
674 | unsigned long action, void *data) | ||
675 | { | 674 | { |
676 | struct device *dev = data; | 675 | struct device *dev = data; |
677 | int count; | 676 | int count; |
678 | 677 | ||
678 | if (global_disable) | ||
679 | return 0; | ||
679 | 680 | ||
680 | switch (action) { | 681 | switch (action) { |
681 | case BUS_NOTIFY_UNBOUND_DRIVER: | 682 | case BUS_NOTIFY_UNBOUND_DRIVER: |
@@ -697,6 +698,9 @@ void dma_debug_add_bus(struct bus_type *bus) | |||
697 | { | 698 | { |
698 | struct notifier_block *nb; | 699 | struct notifier_block *nb; |
699 | 700 | ||
701 | if (global_disable) | ||
702 | return; | ||
703 | |||
700 | nb = kzalloc(sizeof(struct notifier_block), GFP_KERNEL); | 704 | nb = kzalloc(sizeof(struct notifier_block), GFP_KERNEL); |
701 | if (nb == NULL) { | 705 | if (nb == NULL) { |
702 | pr_err("dma_debug_add_bus: out of memory\n"); | 706 | pr_err("dma_debug_add_bus: out of memory\n"); |