Skip to content

Commit b9e26df

Browse files
committed
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
2 parents 11da376 + c329879 commit b9e26df

File tree

4 files changed

+11
-7
lines changed

4 files changed

+11
-7
lines changed

drivers/mtd/maps/plat-ram.c

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,14 @@ static int platram_probe(struct platform_device *pdev)
227227
if (!err)
228228
dev_info(&pdev->dev, "registered mtd device\n");
229229

230-
/* add the whole device. */
231-
err = mtd_device_register(info->mtd, NULL, 0);
232-
if (err)
233-
dev_err(&pdev->dev, "failed to register the entire device\n");
230+
if (pdata->nr_partitions) {
231+
/* add the whole device. */
232+
err = mtd_device_register(info->mtd, NULL, 0);
233+
if (err) {
234+
dev_err(&pdev->dev,
235+
"failed to register the entire device\n");
236+
}
237+
}
234238

235239
return err;
236240

drivers/mtd/maps/pxa2xx-flash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ static int __devinit pxa2xx_flash_probe(struct platform_device *pdev)
9898
}
9999
info->mtd->owner = THIS_MODULE;
100100

101-
mtd_device_parse_register(info->mtd, probes, 0, NULL, 0);
101+
mtd_device_parse_register(info->mtd, probes, 0, flash->parts, flash->nr_parts);
102102

103103
platform_set_drvdata(pdev, info);
104104
return 0;

drivers/mtd/nand/gpmi-nand/gpmi-nand.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
#include <linux/clk.h>
2222
#include <linux/slab.h>
2323
#include <linux/interrupt.h>
24+
#include <linux/module.h>
2425
#include <linux/mtd/gpmi-nand.h>
2526
#include <linux/mtd/partitions.h>
26-
2727
#include "gpmi-nand.h"
2828

2929
/* add our owner bbt descriptor */

drivers/mtd/nand/ndfc.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ static int ndfc_chip_init(struct ndfc_controller *ndfc,
188188
if (!flash_np)
189189
return -ENODEV;
190190

191-
ppdata->of_node = flash_np;
191+
ppdata.of_node = flash_np;
192192
ndfc->mtd.name = kasprintf(GFP_KERNEL, "%s.%s",
193193
dev_name(&ndfc->ofdev->dev), flash_np->name);
194194
if (!ndfc->mtd.name) {

0 commit comments

Comments
 (0)