extern bool translation_pre_enabled(struct amd_iommu *iommu);
-extern bool amd_iommu_is_attach_deferred(struct iommu_domain *domain,
-                                        struct device *dev);
+extern bool amd_iommu_is_attach_deferred(struct device *dev);
 extern int __init add_special_device(u8 type, u8 id, u16 *devid,
                                     bool cmd_line);
 
 
        return ret;
 }
 
-static bool iommu_is_attach_deferred(struct iommu_domain *domain,
-                                    struct device *dev)
+static bool iommu_is_attach_deferred(struct device *dev)
 {
        const struct iommu_ops *ops = dev_iommu_ops(dev);
 
        if (ops->is_attach_deferred)
-               return ops->is_attach_deferred(domain, dev);
+               return ops->is_attach_deferred(dev);
 
        return false;
 }
 
        mutex_lock(&group->mutex);
        list_add_tail(&device->list, &group->devices);
-       if (group->domain  && !iommu_is_attach_deferred(group->domain, dev))
+       if (group->domain  && !iommu_is_attach_deferred(dev))
                ret = __iommu_attach_device(group->domain, dev);
        mutex_unlock(&group->mutex);
        if (ret)
        struct iommu_domain *domain = data;
        int ret = 0;
 
-       if (!iommu_is_attach_deferred(domain, dev))
+       if (!iommu_is_attach_deferred(dev))
                ret = __iommu_attach_device(domain, dev);
 
        return ret;
 
 int iommu_deferred_attach(struct device *dev, struct iommu_domain *domain)
 {
-       const struct iommu_ops *ops = dev_iommu_ops(dev);
-
-       if (ops->is_attach_deferred && ops->is_attach_deferred(domain, dev))
+       if (iommu_is_attach_deferred(dev))
                return __iommu_attach_device(domain, dev);
 
        return 0;
 static void __iommu_detach_device(struct iommu_domain *domain,
                                  struct device *dev)
 {
-       if (iommu_is_attach_deferred(domain, dev))
+       if (iommu_is_attach_deferred(dev))
                return;
 
        if (unlikely(domain->ops->detach_dev == NULL))
 
        void (*put_resv_regions)(struct device *dev, struct list_head *list);
 
        int (*of_xlate)(struct device *dev, struct of_phandle_args *args);
-       bool (*is_attach_deferred)(struct iommu_domain *domain, struct device *dev);
+       bool (*is_attach_deferred)(struct device *dev);
 
        /* Per device IOMMU features */
        bool (*dev_has_feat)(struct device *dev, enum iommu_dev_features f);