diff options
Diffstat (limited to 'drivers/mtd/devices/pmc551.c')
-rw-r--r-- | drivers/mtd/devices/pmc551.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/devices/pmc551.c b/drivers/mtd/devices/pmc551.c index 41b8cdcc64cb..ecff765579dd 100644 --- a/drivers/mtd/devices/pmc551.c +++ b/drivers/mtd/devices/pmc551.c | |||
@@ -798,7 +798,7 @@ static int __init init_pmc551(void) | |||
798 | mtd->writesize = 1; | 798 | mtd->writesize = 1; |
799 | mtd->owner = THIS_MODULE; | 799 | mtd->owner = THIS_MODULE; |
800 | 800 | ||
801 | if (add_mtd_device(mtd)) { | 801 | if (mtd_device_register(mtd, NULL, 0)) { |
802 | printk(KERN_NOTICE "pmc551: Failed to register new device\n"); | 802 | printk(KERN_NOTICE "pmc551: Failed to register new device\n"); |
803 | pci_iounmap(PCI_Device, priv->start); | 803 | pci_iounmap(PCI_Device, priv->start); |
804 | kfree(mtd->priv); | 804 | kfree(mtd->priv); |
@@ -806,7 +806,7 @@ static int __init init_pmc551(void) | |||
806 | break; | 806 | break; |
807 | } | 807 | } |
808 | 808 | ||
809 | /* Keep a reference as the add_mtd_device worked */ | 809 | /* Keep a reference as the mtd_device_register worked */ |
810 | pci_dev_get(PCI_Device); | 810 | pci_dev_get(PCI_Device); |
811 | 811 | ||
812 | printk(KERN_NOTICE "Registered pmc551 memory device.\n"); | 812 | printk(KERN_NOTICE "Registered pmc551 memory device.\n"); |
@@ -856,7 +856,7 @@ static void __exit cleanup_pmc551(void) | |||
856 | pci_dev_put(priv->dev); | 856 | pci_dev_put(priv->dev); |
857 | 857 | ||
858 | kfree(mtd->priv); | 858 | kfree(mtd->priv); |
859 | del_mtd_device(mtd); | 859 | mtd_device_unregister(mtd); |
860 | kfree(mtd); | 860 | kfree(mtd); |
861 | found++; | 861 | found++; |
862 | } | 862 | } |