File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -652,12 +652,11 @@ static int apple_dart_attach_dev(struct iommu_domain *domain,
652652 struct apple_dart_stream_map * stream_map ;
653653 struct apple_dart_master_cfg * cfg = dev_iommu_priv_get (dev );
654654 struct apple_dart_domain * dart_domain = to_dart_domain (domain );
655+ struct apple_dart * dart0 = cfg -> stream_maps [0 ].dart ;
655656
656- if (cfg -> stream_maps [0 ].dart -> force_bypass &&
657- domain -> type != IOMMU_DOMAIN_IDENTITY )
657+ if (dart0 -> force_bypass && domain -> type != IOMMU_DOMAIN_IDENTITY )
658658 return - EINVAL ;
659- if (!cfg -> stream_maps [0 ].dart -> supports_bypass &&
660- domain -> type == IOMMU_DOMAIN_IDENTITY )
659+ if (!dart0 -> supports_bypass && domain -> type == IOMMU_DOMAIN_IDENTITY )
661660 return - EINVAL ;
662661
663662 ret = apple_dart_finalize_domain (domain , cfg );
@@ -907,10 +906,11 @@ static struct iommu_group *apple_dart_device_group(struct device *dev)
907906static int apple_dart_def_domain_type (struct device * dev )
908907{
909908 struct apple_dart_master_cfg * cfg = dev_iommu_priv_get (dev );
909+ struct apple_dart * dart = cfg -> stream_maps [0 ].dart ;
910910
911- if (cfg -> stream_maps [ 0 ]. dart -> force_bypass )
911+ if (dart -> force_bypass )
912912 return IOMMU_DOMAIN_IDENTITY ;
913- if (! cfg -> stream_maps [ 0 ]. dart -> supports_bypass )
913+ if (dart -> supports_bypass )
914914 return IOMMU_DOMAIN_DMA ;
915915
916916 return 0 ;
You can’t perform that action at this time.
0 commit comments