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/devices/phram.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/devices/phram.c')
-rw-r--r-- | drivers/mtd/devices/phram.c | 4 |
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) | |||
115 | struct phram_mtd_list *this, *safe; | 115 | struct phram_mtd_list *this, *safe; |
116 | 116 | ||
117 | list_for_each_entry_safe(this, safe, &phram_list, list) { | 117 | list_for_each_entry_safe(this, safe, &phram_list, list) { |
118 | del_mtd_device(&this->mtd); | 118 | mtd_device_unregister(&this->mtd); |
119 | iounmap(this->mtd.priv); | 119 | iounmap(this->mtd.priv); |
120 | kfree(this->mtd.name); | 120 | kfree(this->mtd.name); |
121 | kfree(this); | 121 | kfree(this); |
@@ -153,7 +153,7 @@ static int register_device(char *name, unsigned long start, unsigned long len) | |||
153 | new->mtd.writesize = 1; | 153 | new->mtd.writesize = 1; |
154 | 154 | ||
155 | ret = -EAGAIN; | 155 | ret = -EAGAIN; |
156 | if (add_mtd_device(&new->mtd)) { | 156 | if (mtd_device_register(&new->mtd, NULL, 0)) { |
157 | pr_err("Failed to register new device\n"); | 157 | pr_err("Failed to register new device\n"); |
158 | goto out2; | 158 | goto out2; |
159 | } | 159 | } |