diff options
author | Jamie Iles <jamie@jamieiles.com> | 2011-05-23 05:22:49 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-05-24 21:20:41 -0400 |
commit | 6cbbf2ffa170c4cb5f1d1c0dd0f2bd597813a002 (patch) | |
tree | bab3a3f14d4b9f5d10ecdd0c6cf9a8e2d97a4390 /drivers/mtd/maps/ixp2000.c | |
parent | c06addd3153af8e6ee10079e8afa2c3bb8a1516e (diff) |
mtd: ixp: convert to mtd_device_register()
Convert to mtd_device_register() and remove the CONFIG_MTD_PARTITIONS
preprocessor conditionals as partitioning is always available.
Cc: Imre Kaloz <kaloz@openwrt.org>
Cc: Krzysztof Halasa <khc@pm.waw.pl>
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/maps/ixp2000.c')
-rw-r--r-- | drivers/mtd/maps/ixp2000.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/maps/ixp2000.c b/drivers/mtd/maps/ixp2000.c index 9639d83a9d6c..c00b9175ba9e 100644 --- a/drivers/mtd/maps/ixp2000.c +++ b/drivers/mtd/maps/ixp2000.c | |||
@@ -119,7 +119,7 @@ static int ixp2000_flash_remove(struct platform_device *dev) | |||
119 | return 0; | 119 | return 0; |
120 | 120 | ||
121 | if (info->mtd) { | 121 | if (info->mtd) { |
122 | del_mtd_partitions(info->mtd); | 122 | mtd_device_unregister(info->mtd); |
123 | map_destroy(info->mtd); | 123 | map_destroy(info->mtd); |
124 | } | 124 | } |
125 | if (info->map.map_priv_1) | 125 | if (info->map.map_priv_1) |
@@ -230,7 +230,7 @@ static int ixp2000_flash_probe(struct platform_device *dev) | |||
230 | 230 | ||
231 | err = parse_mtd_partitions(info->mtd, probes, &info->partitions, 0); | 231 | err = parse_mtd_partitions(info->mtd, probes, &info->partitions, 0); |
232 | if (err > 0) { | 232 | if (err > 0) { |
233 | err = add_mtd_partitions(info->mtd, info->partitions, err); | 233 | err = mtd_device_register(info->mtd, info->partitions, err); |
234 | if(err) | 234 | if(err) |
235 | dev_err(&dev->dev, "Could not parse partitions\n"); | 235 | dev_err(&dev->dev, "Could not parse partitions\n"); |
236 | } | 236 | } |