Skip to content

Commit

Permalink
mtd: spear_smi: use module_platform_driver macro
Browse files Browse the repository at this point in the history
This patch removes some code duplication by using
module_platform_driver.

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@st.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
  • Loading branch information
Srinivas Kandagatla authored and Artem Bityutskiy committed Nov 15, 2012
1 parent 2f25ae9 commit a90019e
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions drivers/mtd/devices/spear_smi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1094,18 +1094,7 @@ static struct platform_driver spear_smi_driver = {
.probe = spear_smi_probe,
.remove = __devexit_p(spear_smi_remove),
};

static int spear_smi_init(void)
{
return platform_driver_register(&spear_smi_driver);
}
module_init(spear_smi_init);

static void spear_smi_exit(void)
{
platform_driver_unregister(&spear_smi_driver);
}
module_exit(spear_smi_exit);
module_platform_driver(spear_smi_driver);

MODULE_LICENSE("GPL");
MODULE_AUTHOR("Ashish Priyadarshi, Shiraz Hashim <shiraz.hashim@st.com>");
Expand Down

0 comments on commit a90019e

Please sign in to comment.