diff options
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 33dc2829b01b..bbe168b65c26 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); |