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/amd76xrom.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/amd76xrom.c')
-rw-r--r-- | drivers/mtd/maps/amd76xrom.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/mtd/maps/amd76xrom.c b/drivers/mtd/maps/amd76xrom.c index 92de7e3a49a5..e2875d6fe129 100644 --- a/drivers/mtd/maps/amd76xrom.c +++ b/drivers/mtd/maps/amd76xrom.c | |||
@@ -82,7 +82,7 @@ static void amd76xrom_cleanup(struct amd76xrom_window *window) | |||
82 | if (map->rsrc.parent) { | 82 | if (map->rsrc.parent) { |
83 | release_resource(&map->rsrc); | 83 | release_resource(&map->rsrc); |
84 | } | 84 | } |
85 | del_mtd_device(map->mtd); | 85 | mtd_device_unregister(map->mtd); |
86 | map_destroy(map->mtd); | 86 | map_destroy(map->mtd); |
87 | list_del(&map->list); | 87 | list_del(&map->list); |
88 | kfree(map); | 88 | kfree(map); |
@@ -262,7 +262,7 @@ static int __devinit amd76xrom_init_one (struct pci_dev *pdev, | |||
262 | 262 | ||
263 | /* Now that the mtd devices is complete claim and export it */ | 263 | /* Now that the mtd devices is complete claim and export it */ |
264 | map->mtd->owner = THIS_MODULE; | 264 | map->mtd->owner = THIS_MODULE; |
265 | if (add_mtd_device(map->mtd)) { | 265 | if (mtd_device_register(map->mtd, NULL, 0)) { |
266 | map_destroy(map->mtd); | 266 | map_destroy(map->mtd); |
267 | map->mtd = NULL; | 267 | map->mtd = NULL; |
268 | goto out; | 268 | goto out; |