diff options
author | Fabio Estevam <fabio.estevam@freescale.com> | 2012-09-05 10:35:25 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2012-09-29 10:43:15 -0400 |
commit | ddf16d620bd80b3c99160acd336c985b70399e37 (patch) | |
tree | 03eb13a41f4005c1360110a7853e8ebb48223d04 /drivers/mtd/nand/mxc_nand.c | |
parent | 490e280a69cb0707ccb4c7e0c5c0be02d8ae102c (diff) |
mtd: mxc_nand: Convert to module_platform_driver()
Using module_platform_driver() makes the code smaller and cleaner.
Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@linux.intel.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand/mxc_nand.c')
-rw-r--r-- | drivers/mtd/nand/mxc_nand.c | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/drivers/mtd/nand/mxc_nand.c b/drivers/mtd/nand/mxc_nand.c index bfee9ebf9ab9..043e989f0578 100644 --- a/drivers/mtd/nand/mxc_nand.c +++ b/drivers/mtd/nand/mxc_nand.c | |||
@@ -1363,7 +1363,7 @@ static int __init mxcnd_probe_pdata(struct mxc_nand_host *host) | |||
1363 | return 0; | 1363 | return 0; |
1364 | } | 1364 | } |
1365 | 1365 | ||
1366 | static int __init mxcnd_probe(struct platform_device *pdev) | 1366 | static int __devinit mxcnd_probe(struct platform_device *pdev) |
1367 | { | 1367 | { |
1368 | struct nand_chip *this; | 1368 | struct nand_chip *this; |
1369 | struct mtd_info *mtd; | 1369 | struct mtd_info *mtd; |
@@ -1555,22 +1555,10 @@ static struct platform_driver mxcnd_driver = { | |||
1555 | .owner = THIS_MODULE, | 1555 | .owner = THIS_MODULE, |
1556 | .of_match_table = of_match_ptr(mxcnd_dt_ids), | 1556 | .of_match_table = of_match_ptr(mxcnd_dt_ids), |
1557 | }, | 1557 | }, |
1558 | .probe = mxcnd_probe, | ||
1558 | .remove = __devexit_p(mxcnd_remove), | 1559 | .remove = __devexit_p(mxcnd_remove), |
1559 | }; | 1560 | }; |
1560 | 1561 | module_platform_driver(mxcnd_driver); | |
1561 | static int __init mxc_nd_init(void) | ||
1562 | { | ||
1563 | return platform_driver_probe(&mxcnd_driver, mxcnd_probe); | ||
1564 | } | ||
1565 | |||
1566 | static void __exit mxc_nd_cleanup(void) | ||
1567 | { | ||
1568 | /* Unregister the device structure */ | ||
1569 | platform_driver_unregister(&mxcnd_driver); | ||
1570 | } | ||
1571 | |||
1572 | module_init(mxc_nd_init); | ||
1573 | module_exit(mxc_nd_cleanup); | ||
1574 | 1562 | ||
1575 | MODULE_AUTHOR("Freescale Semiconductor, Inc."); | 1563 | MODULE_AUTHOR("Freescale Semiconductor, Inc."); |
1576 | MODULE_DESCRIPTION("MXC NAND MTD driver"); | 1564 | MODULE_DESCRIPTION("MXC NAND MTD driver"); |