diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/dma-debug.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/dma-debug.c b/lib/dma-debug.c index d9b08e0f7f55..739974460c32 100644 --- a/lib/dma-debug.c +++ b/lib/dma-debug.c | |||
@@ -676,6 +676,8 @@ static int dma_debug_device_change(struct notifier_block *nb, | |||
676 | struct device *dev = data; | 676 | struct device *dev = data; |
677 | int count; | 677 | int count; |
678 | 678 | ||
679 | if (global_disable) | ||
680 | return; | ||
679 | 681 | ||
680 | switch (action) { | 682 | switch (action) { |
681 | case BUS_NOTIFY_UNBOUND_DRIVER: | 683 | case BUS_NOTIFY_UNBOUND_DRIVER: |
@@ -697,6 +699,9 @@ void dma_debug_add_bus(struct bus_type *bus) | |||
697 | { | 699 | { |
698 | struct notifier_block *nb; | 700 | struct notifier_block *nb; |
699 | 701 | ||
702 | if (global_disable) | ||
703 | return; | ||
704 | |||
700 | nb = kzalloc(sizeof(struct notifier_block), GFP_KERNEL); | 705 | nb = kzalloc(sizeof(struct notifier_block), GFP_KERNEL); |
701 | if (nb == NULL) { | 706 | if (nb == NULL) { |
702 | pr_err("dma_debug_add_bus: out of memory\n"); | 707 | pr_err("dma_debug_add_bus: out of memory\n"); |