diff options
author | Jamie Iles <jamie@jamieiles.com> | 2011-05-23 05:22:50 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-05-24 21:20:48 -0400 |
commit | 3dfad123e81cdf11642aa63da1149ee71a369d2d (patch) | |
tree | 971642bf84d176dc7b52cfccc95a420158a0e6d7 /drivers/mtd/nand | |
parent | 6cbbf2ffa170c4cb5f1d1c0dd0f2bd597813a002 (diff) |
mtd: pxa: convert to mtd_device_register()
Convert to mtd_device_register() and remove the CONFIG_MTD_PARTITIONS
preprocessor conditionals as partitioning is always available.
Cc: Cc: David Woodhouse <dwmw2@infradead.org>
Cc: Artem Bityutskiy <dedekind1@gmail.com>
Signed-off-by: Jamie Iles <jamie@jamieiles.com>
Signed-off-by: Artem Bityutskiy <Artem.Bityutskiy@nokia.com>
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Diffstat (limited to 'drivers/mtd/nand')
-rw-r--r-- | drivers/mtd/nand/pxa3xx_nand.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/drivers/mtd/nand/pxa3xx_nand.c b/drivers/mtd/nand/pxa3xx_nand.c index ff0701276d65..1fb3b3a80581 100644 --- a/drivers/mtd/nand/pxa3xx_nand.c +++ b/drivers/mtd/nand/pxa3xx_nand.c | |||
@@ -1119,10 +1119,7 @@ static int pxa3xx_nand_remove(struct platform_device *pdev) | |||
1119 | clk_put(info->clk); | 1119 | clk_put(info->clk); |
1120 | 1120 | ||
1121 | if (mtd) { | 1121 | if (mtd) { |
1122 | del_mtd_device(mtd); | 1122 | mtd_device_unregister(mtd); |
1123 | #ifdef CONFIG_MTD_PARTITIONS | ||
1124 | del_mtd_partitions(mtd); | ||
1125 | #endif | ||
1126 | kfree(mtd); | 1123 | kfree(mtd); |
1127 | } | 1124 | } |
1128 | return 0; | 1125 | return 0; |
@@ -1149,7 +1146,6 @@ static int pxa3xx_nand_probe(struct platform_device *pdev) | |||
1149 | return -ENODEV; | 1146 | return -ENODEV; |
1150 | } | 1147 | } |
1151 | 1148 | ||
1152 | #ifdef CONFIG_MTD_PARTITIONS | ||
1153 | if (mtd_has_cmdlinepart()) { | 1149 | if (mtd_has_cmdlinepart()) { |
1154 | const char *probes[] = { "cmdlinepart", NULL }; | 1150 | const char *probes[] = { "cmdlinepart", NULL }; |
1155 | struct mtd_partition *parts; | 1151 | struct mtd_partition *parts; |
@@ -1158,13 +1154,10 @@ static int pxa3xx_nand_probe(struct platform_device *pdev) | |||
1158 | nr_parts = parse_mtd_partitions(info->mtd, probes, &parts, 0); | 1154 | nr_parts = parse_mtd_partitions(info->mtd, probes, &parts, 0); |
1159 | 1155 | ||
1160 | if (nr_parts) | 1156 | if (nr_parts) |
1161 | return add_mtd_partitions(info->mtd, parts, nr_parts); | 1157 | return mtd_device_register(info->mtd, parts, nr_parts); |
1162 | } | 1158 | } |
1163 | 1159 | ||
1164 | return add_mtd_partitions(info->mtd, pdata->parts, pdata->nr_parts); | 1160 | return mtd_device_register(info->mtd, pdata->parts, pdata->nr_parts); |
1165 | #else | ||
1166 | return 0; | ||
1167 | #endif | ||
1168 | } | 1161 | } |
1169 | 1162 | ||
1170 | #ifdef CONFIG_PM | 1163 | #ifdef CONFIG_PM |