Skip to contentSkip to conversation

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

DISCUSSION Stephen Rothwell 1 participant 1 message Jan 21, 2015 Linux-next tree

lore
Share & tools
lore
#0 lore raw

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).

Signature · 41 lines
Cheers,
Stephen Rothwell                    [email protected]

diff --cc drivers/mtd/mtdcore.c
index cbc0fc46d2d6,ff38a1df22f7..000000000000
--- a/drivers/mtd/mtdcore.c
+++ b/drivers/mtd/mtdcore.c
@@@ -366,17 -339,22 +340,33 @@@ 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;
+ 	}
+ }
+ #endif
+ 
  /**
   *	add_mtd_device - register an MTD device
   *	@mtd: pointer to new MTD device info structure