diff mbox

[02/11] iommu/omap: Remove all module references

Message ID 1437431613-55656-3-git-send-email-s-anna@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Suman Anna July 20, 2015, 10:33 p.m. UTC
The OMAP IOMMU driver has been adapted to the IOMMU framework
for a while now, and it does not support being built as a
module anymore. So, remove all the module references from the
OMAP IOMMU driver.

While at it, also relocate a comment around the subsys_initcall
to avoid a checkpatch strict warning about using a blank line
after function/struct/union/enum declarations.

Signed-off-by: Suman Anna <s-anna@ti.com>
---
 drivers/iommu/omap-iommu.c | 19 +------------------
 1 file changed, 1 insertion(+), 18 deletions(-)

Comments

Laurent Pinchart July 21, 2015, 4 p.m. UTC | #1
Hi Suman,

On Monday 20 July 2015 17:33:24 Suman Anna wrote:
> The OMAP IOMMU driver has been adapted to the IOMMU framework
> for a while now, and it does not support being built as a
> module anymore. So, remove all the module references from the
> OMAP IOMMU driver.
> 
> While at it, also relocate a comment around the subsys_initcall
> to avoid a checkpatch strict warning about using a blank line
> after function/struct/union/enum declarations.
> 
> Signed-off-by: Suman Anna <s-anna@ti.com>

I think this is one of the checkpatch warnings that can be safely ignored, but 
it doesn't matter much. The comment will be removed after the OMAP3 ISP and 
OMAP IOMMU drivers get support for a saner IOMMU probing dependency order 
solution.

The code seems fine to me.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  drivers/iommu/omap-iommu.c | 19 +------------------
>  1 file changed, 1 insertion(+), 18 deletions(-)
> 
> diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
> index a22c33d6a486..eeecfc4073af 100644
> --- a/drivers/iommu/omap-iommu.c
> +++ b/drivers/iommu/omap-iommu.c
> @@ -12,7 +12,6 @@
>   */
> 
>  #include <linux/err.h>
> -#include <linux/module.h>
>  #include <linux/slab.h>
>  #include <linux/interrupt.h>
>  #include <linux/ioport.h>
> @@ -1089,7 +1088,6 @@ static const struct of_device_id omap_iommu_of_match[]
> = { { .compatible = "ti,dra7-iommu"	},
>  	{},
>  };
> -MODULE_DEVICE_TABLE(of, omap_iommu_of_match);
> 
>  static struct platform_driver omap_iommu_driver = {
>  	.probe	= omap_iommu_probe,
> @@ -1405,20 +1403,5 @@ static int __init omap_iommu_init(void)
> 
>  	return platform_driver_register(&omap_iommu_driver);
>  }
> -/* must be ready before omap3isp is probed */
>  subsys_initcall(omap_iommu_init);
> -
> -static void __exit omap_iommu_exit(void)
> -{
> -	kmem_cache_destroy(iopte_cachep);
> -
> -	platform_driver_unregister(&omap_iommu_driver);
> -
> -	omap_iommu_debugfs_exit();
> -}
> -module_exit(omap_iommu_exit);
> -
> -MODULE_DESCRIPTION("omap iommu: tlb and pagetable primitives");
> -MODULE_ALIAS("platform:omap-iommu");
> -MODULE_AUTHOR("Hiroshi DOYU, Paul Mundt and Toshihiro Kobayashi");
> -MODULE_LICENSE("GPL v2");
> +/* must be ready before omap3isp is probed */
Suman Anna July 21, 2015, 11:44 p.m. UTC | #2
Hi Laurent,

>
> On Monday 20 July 2015 17:33:24 Suman Anna wrote:
>> The OMAP IOMMU driver has been adapted to the IOMMU framework
>> for a while now, and it does not support being built as a
>> module anymore. So, remove all the module references from the
>> OMAP IOMMU driver.
>>
>> While at it, also relocate a comment around the subsys_initcall
>> to avoid a checkpatch strict warning about using a blank line
>> after function/struct/union/enum declarations.
>>
>> Signed-off-by: Suman Anna <s-anna@ti.com>
> 
> I think this is one of the checkpatch warnings that can be safely ignored, but 
> it doesn't matter much. The comment will be removed after the OMAP3 ISP and 
> OMAP IOMMU drivers get support for a saner IOMMU probing dependency order 
> solution.
> 
> The code seems fine to me.
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Yes, indeed. I have also started to work on some patches to switch to
using the IOMMU_OF_DECLARE init, that should also help us. I will post
those for the 4.4 kernel merge window.

regards
Suman


--
To unsubscribe from this list: send the line "unsubscribe linux-omap" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index a22c33d6a486..eeecfc4073af 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -12,7 +12,6 @@ 
  */
 
 #include <linux/err.h>
-#include <linux/module.h>
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/ioport.h>
@@ -1089,7 +1088,6 @@  static const struct of_device_id omap_iommu_of_match[] = {
 	{ .compatible = "ti,dra7-iommu"	},
 	{},
 };
-MODULE_DEVICE_TABLE(of, omap_iommu_of_match);
 
 static struct platform_driver omap_iommu_driver = {
 	.probe	= omap_iommu_probe,
@@ -1405,20 +1403,5 @@  static int __init omap_iommu_init(void)
 
 	return platform_driver_register(&omap_iommu_driver);
 }
-/* must be ready before omap3isp is probed */
 subsys_initcall(omap_iommu_init);
-
-static void __exit omap_iommu_exit(void)
-{
-	kmem_cache_destroy(iopte_cachep);
-
-	platform_driver_unregister(&omap_iommu_driver);
-
-	omap_iommu_debugfs_exit();
-}
-module_exit(omap_iommu_exit);
-
-MODULE_DESCRIPTION("omap iommu: tlb and pagetable primitives");
-MODULE_ALIAS("platform:omap-iommu");
-MODULE_AUTHOR("Hiroshi DOYU, Paul Mundt and Toshihiro Kobayashi");
-MODULE_LICENSE("GPL v2");
+/* must be ready before omap3isp is probed */