aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/devices/phram.c
diff options
context:
space:
mode:
authorJamie Iles <jamie@jamieiles.com>2011-05-23 10:23:40 +0100
committerDavid Woodhouse <David.Woodhouse@intel.com>2011-05-25 02:25:00 +0100
commitee0e87b174bb41f0310cf089262bf5dd8f95a212 (patch)
tree444b7eb1cc1a807561889a4cffe15fde11761645 /drivers/mtd/devices/phram.c
parentmtd: samsung onenand: convert to mtd_device_register() (diff)
downloadlinux-dev-ee0e87b174bb41f0310cf089262bf5dd8f95a212.tar.xz
linux-dev-ee0e87b174bb41f0310cf089262bf5dd8f95a212.zip
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 '')
-rw-r--r--drivers/mtd/devices/phram.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/devices/phram.c b/drivers/mtd/devices/phram.c
index 8d28fa02a5a2..23423bd00b06 100644
--- a/drivers/mtd/devices/phram.c
+++ b/drivers/mtd/devices/phram.c
@@ -115,7 +115,7 @@ static void unregister_devices(void)
struct phram_mtd_list *this, *safe;
list_for_each_entry_safe(this, safe, &phram_list, list) {
- del_mtd_device(&this->mtd);
+ mtd_device_unregister(&this->mtd);
iounmap(this->mtd.priv);
kfree(this->mtd.name);
kfree(this);
@@ -153,7 +153,7 @@ static int register_device(char *name, unsigned long start, unsigned long len)
new->mtd.writesize = 1;
ret = -EAGAIN;
- if (add_mtd_device(&new->mtd)) {
+ if (mtd_device_register(&new->mtd, NULL, 0)) {
pr_err("Failed to register new device\n");
goto out2;
}