aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/mtd/maps
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-10-29 11:08:31 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-10-29 11:08:31 -0400
commit14e66f767f5e8d023e098b475dc24ddc9a5dbdfd (patch)
tree11d0835775cb00a164b2e3d4b23f282a002277cd /drivers/mtd/maps
parent822e5e72697ce06e4425c17d161b0482c7d9b6d4 (diff)
[ARM] Allow MTD device name to be passed via platform data
Allow SA1100 devices to pass the name of the flash device to the SA1100 map driver. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/mtd/maps')
-rw-r--r--drivers/mtd/maps/sa1100-flash.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mtd/maps/sa1100-flash.c b/drivers/mtd/maps/sa1100-flash.c
index c38c2c311b8e..acf01ef9b575 100644
--- a/drivers/mtd/maps/sa1100-flash.c
+++ b/drivers/mtd/maps/sa1100-flash.c
@@ -301,7 +301,7 @@ sa1100_setup_mtd(struct platform_device *pdev, struct flash_platform_data *plat)
301 break; 301 break;
302 302
303 subdev->map.name = subdev->name; 303 subdev->map.name = subdev->name;
304 sprintf(subdev->name, "sa1100-%d", i); 304 sprintf(subdev->name, "%s-%d", plat->name, i);
305 subdev->plat = plat; 305 subdev->plat = plat;
306 306
307 ret = sa1100_probe_subdev(subdev, res); 307 ret = sa1100_probe_subdev(subdev, res);
@@ -323,7 +323,7 @@ sa1100_setup_mtd(struct platform_device *pdev, struct flash_platform_data *plat)
323 * otherwise fail. Either way, it'll be called "sa1100". 323 * otherwise fail. Either way, it'll be called "sa1100".
324 */ 324 */
325 if (info->num_subdev == 1) { 325 if (info->num_subdev == 1) {
326 strcpy(info->subdev[0].name, "sa1100"); 326 strcpy(info->subdev[0].name, plat->name);
327 info->mtd = info->subdev[0].mtd; 327 info->mtd = info->subdev[0].mtd;
328 ret = 0; 328 ret = 0;
329 } else if (info->num_subdev > 1) { 329 } else if (info->num_subdev > 1) {
@@ -336,7 +336,7 @@ sa1100_setup_mtd(struct platform_device *pdev, struct flash_platform_data *plat)
336 cdev[i] = info->subdev[i].mtd; 336 cdev[i] = info->subdev[i].mtd;
337 337
338 info->mtd = mtd_concat_create(cdev, info->num_subdev, 338 info->mtd = mtd_concat_create(cdev, info->num_subdev,
339 "sa1100"); 339 plat->name);
340 if (info->mtd == NULL) 340 if (info->mtd == NULL)
341 ret = -ENXIO; 341 ret = -ENXIO;
342#else 342#else