]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/iommu/omap-iommu.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mason/linux...
[karo-tx-linux.git] / drivers / iommu / omap-iommu.c
index df579f8779cd5766cb137d1b7cdbf74a3abcf2c8..36278870e84a7b1d7350772beb2c8e2aee11fa40 100644 (file)
@@ -893,19 +893,11 @@ static struct omap_iommu *omap_iommu_attach(const char *name, u32 *iopgd)
                goto err_enable;
        flush_iotlb_all(obj);
 
-       if (!try_module_get(obj->owner)) {
-               err = -ENODEV;
-               goto err_module;
-       }
-
        spin_unlock(&obj->iommu_lock);
 
        dev_dbg(obj->dev, "%s: %s\n", __func__, obj->name);
        return obj;
 
-err_module:
-       if (obj->refcount == 1)
-               iommu_disable(obj);
 err_enable:
        obj->refcount--;
        spin_unlock(&obj->iommu_lock);
@@ -926,8 +918,6 @@ static void omap_iommu_detach(struct omap_iommu *obj)
        if (--obj->refcount == 0)
                iommu_disable(obj);
 
-       module_put(obj->owner);
-
        obj->iopgd = NULL;
 
        spin_unlock(&obj->iommu_lock);
@@ -1007,7 +997,7 @@ static int omap_iommu_remove(struct platform_device *pdev)
        return 0;
 }
 
-static struct of_device_id omap_iommu_of_match[] = {
+static const struct of_device_id omap_iommu_of_match[] = {
        { .compatible = "ti,omap2-iommu" },
        { .compatible = "ti,omap4-iommu" },
        { .compatible = "ti,dra7-iommu" },