diff options
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"); |