]> git.karo-electronics.de Git - linux-beck.git/commitdiff
powerpc: dart_iommu: Remove check for controller_ops == NULL case
authorDaniel Axtens <dja@axtens.net>
Tue, 31 Mar 2015 05:00:57 +0000 (16:00 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Sat, 11 Apr 2015 10:49:19 +0000 (20:49 +1000)
Now that we have ported the calls to iommu_init_early_dart to always
supply a pci_controller_ops struct, we can safely drop the check.

Signed-off-by: Daniel Axtens <dja@axtens.net>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/sysdev/dart_iommu.c

index 87b80009bc9f58eeb7a634b48596a72b91552c54..d00a5663e312d33c6e0e01c6871ba9247a59cfc6 100644 (file)
@@ -395,20 +395,17 @@ void __init iommu_init_early_dart(struct pci_controller_ops *controller_ops)
        if (dart_is_u4)
                ppc_md.dma_set_mask = dart_dma_set_mask;
 
-       if (controller_ops) {
-               controller_ops->dma_dev_setup = pci_dma_dev_setup_dart;
-               controller_ops->dma_bus_setup = pci_dma_bus_setup_dart;
-       }
+       controller_ops->dma_dev_setup = pci_dma_dev_setup_dart;
+       controller_ops->dma_bus_setup = pci_dma_bus_setup_dart;
+
        /* Setup pci_dma ops */
        set_pci_dma_ops(&dma_iommu_ops);
        return;
 
  bail:
        /* If init failed, use direct iommu and null setup functions */
-       if (controller_ops) {
-               controller_ops->dma_dev_setup = NULL;
-               controller_ops->dma_bus_setup = NULL;
-       }
+       controller_ops->dma_dev_setup = NULL;
+       controller_ops->dma_bus_setup = NULL;
 
        /* Setup pci_dma ops */
        set_pci_dma_ops(&dma_direct_ops);