Skip to content

Commit

Permalink
Merge git://git.infradead.org/mtd-2.6
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
torvalds committed Dec 21, 2011
2 parents 11da376 + c329879 commit b9e26df
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 7 deletions.
12 changes: 8 additions & 4 deletions drivers/mtd/maps/plat-ram.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion drivers/mtd/maps/pxa2xx-flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion drivers/mtd/nand/gpmi-nand/gpmi-nand.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down
2 changes: 1 addition & 1 deletion drivers/mtd/nand/ndfc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit b9e26df

Please sign in to comment.