Skip to content

Commit

Permalink
mtd: doc: use module_platform_driver_probe()
Browse files Browse the repository at this point in the history
This patch uses module_platform_driver_probe() macro which makes
the code smaller and simpler.

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Jingoo Han authored and David Woodhouse committed Apr 5, 2013
1 parent a6fb35d commit 725a227
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 24 deletions.
13 changes: 1 addition & 12 deletions drivers/mtd/devices/docg3.c
Original file line number Diff line number Diff line change
Expand Up @@ -2144,18 +2144,7 @@ static struct platform_driver g3_driver = {
.remove = __exit_p(docg3_release),
};

static int __init docg3_init(void)
{
return platform_driver_probe(&g3_driver, docg3_probe);
}
module_init(docg3_init);


static void __exit docg3_exit(void)
{
platform_driver_unregister(&g3_driver);
}
module_exit(docg3_exit);
module_platform_driver_probe(g3_driver, docg3_probe);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Robert Jarzmik <robert.jarzmik@free.fr>");
Expand Down
13 changes: 1 addition & 12 deletions drivers/mtd/nand/docg4.c
Original file line number Diff line number Diff line change
Expand Up @@ -1397,18 +1397,7 @@ static struct platform_driver docg4_driver = {
.remove = __exit_p(cleanup_docg4),
};

static int __init docg4_init(void)
{
return platform_driver_probe(&docg4_driver, probe_docg4);
}

static void __exit docg4_exit(void)
{
platform_driver_unregister(&docg4_driver);
}

module_init(docg4_init);
module_exit(docg4_exit);
module_platform_driver_probe(docg4_driver, probe_docg4);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Mike Dunn");
Expand Down

0 comments on commit 725a227

Please sign in to comment.