From: Srinivas Kandagatla Date: Wed, 10 Oct 2012 18:39:59 +0000 (+0100) Subject: mtd: spear_smi: use module_platform_driver macro X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=a90019e25e0caed04d3704235b5ea984aaa28da8;p=linux-beck.git mtd: spear_smi: use module_platform_driver macro This patch removes some code duplication by using module_platform_driver. Signed-off-by: Srinivas Kandagatla Signed-off-by: Artem Bityutskiy --- diff --git a/drivers/mtd/devices/spear_smi.c b/drivers/mtd/devices/spear_smi.c index dcc3c9511530..39e95673cdd2 100644 --- a/drivers/mtd/devices/spear_smi.c +++ b/drivers/mtd/devices/spear_smi.c @@ -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 ");