From a29f280b739985a9e829d67af4d08e6584153495 Mon Sep 17 00:00:00 2001 From: Adrian Hunter Date: Mon, 23 Mar 2009 14:57:38 +0200 Subject: [MTD] [OneNAND] omap2: panic_write may be in an interrupt context panic_write may read in an interrupt context. Signed-off-by: Adrian Hunter Signed-off-by: David Woodhouse --- drivers/mtd/onenand/omap2.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'drivers/mtd/onenand/omap2.c') diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index 77a4f14..2c199b3 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c @@ -294,6 +294,10 @@ static int omap3_onenand_read_bufferram(struct mtd_info *mtd, int area, if (bram_offset & 3 || (size_t)buf & 3 || count < 384) goto out_copy; + /* panic_write() may be in an interrupt context */ + if (in_interrupt()) + goto out_copy; + if (buf >= high_memory) { struct page *p1; -- cgit v1.1 From 87f39f0493edf7051b1b87c6e9eb7f9a74be8e85 Mon Sep 17 00:00:00 2001 From: David Brownell Date: Thu, 26 Mar 2009 00:42:50 -0700 Subject: [MTD] support driver model updates Follow-on patch to the previous driver model patch for the MTD framework. This one makes various MTD drivers connect to the driver model tree, so /sys/devices/virtual/mtd/* nodes are no longer present ... mostly drivers used on boards I have handy. Based on a patch from Kay Sievers. Signed-off-by: David Brownell Signed-off-by: David Woodhouse --- drivers/mtd/onenand/omap2.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'drivers/mtd/onenand/omap2.c') diff --git a/drivers/mtd/onenand/omap2.c b/drivers/mtd/onenand/omap2.c index 2c199b3..f2e9de1 100644 --- a/drivers/mtd/onenand/omap2.c +++ b/drivers/mtd/onenand/omap2.c @@ -676,6 +676,8 @@ static int __devinit omap2_onenand_probe(struct platform_device *pdev) c->mtd.priv = &c->onenand; c->mtd.owner = THIS_MODULE; + c->mtd.dev.parent = &pdev->dev; + if (c->dma_channel >= 0) { struct onenand_chip *this = &c->onenand; -- cgit v1.1