Merge git://git.infradead.org/mtd-2.6

* git://git.infradead.org/mtd-2.6:
  mtd: plat_ram: call mtd_device_register only if partition data exists
  mtd: pxa2xx-flash.c: It used to fall back to provided table.
  mtd: gpmi: add missing include 'module.h'
  mtd: ndfc: fix typo in structure dereference
This commit is contained in:
Linus Torvalds 2011-12-20 18:39:37 -08:00
commit b9e26dfdad
4 changed files with 11 additions and 7 deletions

View File

@ -227,10 +227,14 @@ static int platram_probe(struct platform_device *pdev)
if (!err)
dev_info(&pdev->dev, "registered mtd device\n");
/* add the whole device. */
err = mtd_device_register(info->mtd, NULL, 0);
if (err)
dev_err(&pdev->dev, "failed to register the entire device\n");
if (pdata->nr_partitions) {
/* add the whole device. */
err = mtd_device_register(info->mtd, NULL, 0);
if (err) {
dev_err(&pdev->dev,
"failed to register the entire device\n");
}
}
return err;

View File

@ -98,7 +98,7 @@ static int __devinit pxa2xx_flash_probe(struct platform_device *pdev)
}
info->mtd->owner = THIS_MODULE;
mtd_device_parse_register(info->mtd, probes, 0, NULL, 0);
mtd_device_parse_register(info->mtd, probes, 0, flash->parts, flash->nr_parts);
platform_set_drvdata(pdev, info);
return 0;

View File

@ -21,9 +21,9 @@
#include <linux/clk.h>
#include <linux/slab.h>
#include <linux/interrupt.h>
#include <linux/module.h>
#include <linux/mtd/gpmi-nand.h>
#include <linux/mtd/partitions.h>
#include "gpmi-nand.h"
/* add our owner bbt descriptor */

View File

@ -188,7 +188,7 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc,
if (!flash_np)
return -ENODEV;
ppdata->of_node = flash_np;
ppdata.of_node = flash_np;
ndfc->mtd.name = kasprintf(GFP_KERNEL, "%s.%s",
dev_name(&ndfc->ofdev->dev), flash_np->name);
if (!ndfc->mtd.name) {