Skip to content

Commit

Permalink
mtd: nand/gpio: Convert to module_platform_driver()
Browse files Browse the repository at this point in the history
module_platform_driver simplifies the code by eliminating
module_init and module_exit calls.

Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
  • Loading branch information
Sachin Kamat authored and David Woodhouse committed Sep 29, 2012
1 parent 24b82d3 commit 2fe87ae
Showing 1 changed file with 1 addition and 14 deletions.
15 changes: 1 addition & 14 deletions drivers/mtd/nand/gpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,20 +417,7 @@ static struct platform_driver gpio_nand_driver = {
},
};

static int __init gpio_nand_init(void)
{
printk(KERN_INFO "GPIO NAND driver, © 2004 Simtec Electronics\n");

return platform_driver_register(&gpio_nand_driver);
}

static void __exit gpio_nand_exit(void)
{
platform_driver_unregister(&gpio_nand_driver);
}

module_init(gpio_nand_init);
module_exit(gpio_nand_exit);
module_platform_driver(gpio_nand_driver);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Ben Dooks <ben@simtec.co.uk>");
Expand Down

0 comments on commit 2fe87ae

Please sign in to comment.