Commit b9e26dfdad5a4f9cbdaacafac6998614cc9c41bc
Exists in
master
and in
20 other branches
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
Showing 4 changed files Side-by-side Diff
drivers/mtd/maps/plat-ram.c
... | ... | @@ -227,10 +227,14 @@ |
227 | 227 | if (!err) |
228 | 228 | dev_info(&pdev->dev, "registered mtd device\n"); |
229 | 229 | |
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 | + } | |
234 | 238 | |
235 | 239 | return err; |
236 | 240 |
drivers/mtd/maps/pxa2xx-flash.c
drivers/mtd/nand/gpmi-nand/gpmi-nand.c
... | ... | @@ -21,9 +21,9 @@ |
21 | 21 | #include <linux/clk.h> |
22 | 22 | #include <linux/slab.h> |
23 | 23 | #include <linux/interrupt.h> |
24 | +#include <linux/module.h> | |
24 | 25 | #include <linux/mtd/gpmi-nand.h> |
25 | 26 | #include <linux/mtd/partitions.h> |
26 | - | |
27 | 27 | #include "gpmi-nand.h" |
28 | 28 | |
29 | 29 | /* add our owner bbt descriptor */ |
drivers/mtd/nand/ndfc.c