aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps/physmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/mtd/maps/physmap.c')
-rw-r--r--drivers/mtd/maps/physmap.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/mtd/maps/physmap.c b/drivers/mtd/maps/physmap.c
index 66e8200079c..abc562653b3 100644
--- a/drivers/mtd/maps/physmap.c
+++ b/drivers/mtd/maps/physmap.c
@@ -85,6 +85,7 @@ static int physmap_flash_probe(struct platform_device *dev)
85 struct physmap_flash_data *physmap_data; 85 struct physmap_flash_data *physmap_data;
86 struct physmap_flash_info *info; 86 struct physmap_flash_info *info;
87 const char **probe_type; 87 const char **probe_type;
88 const char **part_types;
88 int err = 0; 89 int err = 0;
89 int i; 90 int i;
90 int devices_found = 0; 91 int devices_found = 0;
@@ -171,7 +172,9 @@ static int physmap_flash_probe(struct platform_device *dev)
171 if (err) 172 if (err)
172 goto err_out; 173 goto err_out;
173 174
174 mtd_device_parse_register(info->cmtd, part_probe_types, 0, 175 part_types = physmap_data->part_probe_types ? : part_probe_types;
176
177 mtd_device_parse_register(info->cmtd, part_types, 0,
175 physmap_data->parts, physmap_data->nr_parts); 178 physmap_data->parts, physmap_data->nr_parts);
176 return 0; 179 return 0;
177 180
@@ -187,9 +190,8 @@ static void physmap_flash_shutdown(struct platform_device *dev)
187 int i; 190 int i;
188 191
189 for (i = 0; i < MAX_RESOURCES && info->mtd[i]; i++) 192 for (i = 0; i < MAX_RESOURCES && info->mtd[i]; i++)
190 if (info->mtd[i]->suspend && info->mtd[i]->resume) 193 if (mtd_suspend(info->mtd[i]) == 0)
191 if (info->mtd[i]->suspend(info->mtd[i]) == 0) 194 mtd_resume(info->mtd[i]);
192 info->mtd[i]->resume(info->mtd[i]);
193} 195}
194#else 196#else
195#define physmap_flash_shutdown NULL 197#define physmap_flash_shutdown NULL