linux-next: manual merge of the block tree with the l2-mtd tree

From: Stephen Rothwell
Date: Wed Jan 28 2015 - 22:04:28 EST


Hi Jens,

Today's linux-next merge of the block tree got a conflict in
drivers/mtd/mtdcore.c between commit 3efe41be224c ("mtd: implement
common reboot notifier boilerplate") from the tree and commit
b4caecd48005 ("fs: introduce f_op->mmap_capabilities for nommu mmap
support") from the block tree.

I fixed it up (see below) and can carry the fix as necessary (no action
is required).

--
Cheers,
Stephen Rothwell sfr@xxxxxxxxxxxxxxxx

diff --cc drivers/mtd/mtdcore.c
index cbc0fc46d2d6,0ec4d6ea1e4b..000000000000
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@@ -366,17 -339,23 +340,34 @@@ static struct device_type mtd_devtype
.release = mtd_release,
};

+static int mtd_reboot_notifier(struct notifier_block *n, unsigned long state,
+ void *cmd)
+{
+ struct mtd_info *mtd;
+
+ mtd = container_of(n, struct mtd_info, reboot_notifier);
+ mtd->_reboot(mtd);
+
+ return NOTIFY_DONE;
+}
+
+ #ifndef CONFIG_MMU
+ unsigned mtd_mmap_capabilities(struct mtd_info *mtd)
+ {
+ switch (mtd->type) {
+ case MTD_RAM:
+ return NOMMU_MAP_COPY | NOMMU_MAP_DIRECT | NOMMU_MAP_EXEC |
+ NOMMU_MAP_READ | NOMMU_MAP_WRITE;
+ case MTD_ROM:
+ return NOMMU_MAP_COPY | NOMMU_MAP_DIRECT | NOMMU_MAP_EXEC |
+ NOMMU_MAP_READ;
+ default:
+ return NOMMU_MAP_COPY;
+ }
+ }
+ EXPORT_SYMBOL_GPL(mtd_mmap_capabilities);
+ #endif
+
/**
* add_mtd_device - register an MTD device
* @mtd: pointer to new MTD device info structure

Attachment: pgpz_wXYA4Y0X.pgp
Description: OpenPGP digital signature