diff options
author | Jamie Iles <jamie@jamieiles.com> | 2011-05-23 05:23:40 -0400 |
---|---|---|
committer | David Woodhouse <David.Woodhouse@intel.com> | 2011-05-24 21:25:00 -0400 |
commit | ee0e87b174bb41f0310cf089262bf5dd8f95a212 (patch) | |
tree | 444b7eb1cc1a807561889a4cffe15fde11761645 /drivers/mtd/maps/pcmciamtd.c | |
parent | 6b57c11601c8fa4bfa046513c4df155b3b58ea89 (diff) |
mtd: convert remaining users to mtd_device_register()
The older add_mtd_device()/add_mtd_partitions() and their removal
counterparts will soon be gone. Replace uses with mtd_device_register()
and mtd_device_unregister().
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/pcmciamtd.c')
-rw-r--r-- | drivers/mtd/maps/pcmciamtd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/maps/pcmciamtd.c b/drivers/mtd/maps/pcmciamtd.c index 6799e75d74e0..a523e2a6af53 100644 --- a/drivers/mtd/maps/pcmciamtd.c +++ b/drivers/mtd/maps/pcmciamtd.c | |||
@@ -630,7 +630,7 @@ static int pcmciamtd_config(struct pcmcia_device *link) | |||
630 | dev->pcmcia_map.copy_to = pcmcia_copy_to; | 630 | dev->pcmcia_map.copy_to = pcmcia_copy_to; |
631 | } | 631 | } |
632 | 632 | ||
633 | if(add_mtd_device(mtd)) { | 633 | if (mtd_device_register(mtd, NULL, 0)) { |
634 | map_destroy(mtd); | 634 | map_destroy(mtd); |
635 | dev->mtd_info = NULL; | 635 | dev->mtd_info = NULL; |
636 | dev_err(&dev->p_dev->dev, | 636 | dev_err(&dev->p_dev->dev, |
@@ -669,7 +669,7 @@ static void pcmciamtd_detach(struct pcmcia_device *link) | |||
669 | DEBUG(3, "link=0x%p", link); | 669 | DEBUG(3, "link=0x%p", link); |
670 | 670 | ||
671 | if(dev->mtd_info) { | 671 | if(dev->mtd_info) { |
672 | del_mtd_device(dev->mtd_info); | 672 | mtd_device_unregister(dev->mtd_info); |
673 | dev_info(&dev->p_dev->dev, "mtd%d: Removing\n", | 673 | dev_info(&dev->p_dev->dev, "mtd%d: Removing\n", |
674 | dev->mtd_info->index); | 674 | dev->mtd_info->index); |
675 | map_destroy(dev->mtd_info); | 675 | map_destroy(dev->mtd_info); |