All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Andreas Bießmann" <andreas@biessmann.de>
To: linux-kernel@vger.kernel.org
Cc: "Artem Bityutskiy" <artem.bityutskiy@linux.intel.com>,
	linux-omap@vger.kernel.org,
	"Andreas Bießmann" <andreas@biessmann.de>,
	linux-mtd@lists.infradead.org
Subject: [PATCH 2/2] mtd/nand/omap2: fix module loading
Date: Fri, 31 Aug 2012 13:35:42 +0200	[thread overview]
Message-ID: <1346412942-4015-3-git-send-email-andreas@biessmann.de> (raw)
In-Reply-To: <1346412942-4015-1-git-send-email-andreas@biessmann.de>

Unloading the omap2 nand driver missed to release the memory region which will
result in not being able to request it again if one want to load the driver
later on.

This patch fixes following error when loading omap2 module after unloading:
---8<---
~ $ rmmod omap2
~ $ modprobe omap2
[   37.420928] omap2-nand: probe of omap2-nand.0 failed with error -16
~ $
--->8---

This error was introduced in 67ce04bf2746f8a1f8c2a104b313d20c63f68378 which
was the first commit of this driver.

Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
cc: linux-mtd@lists.infradead.org
---
 drivers/mtd/nand/omap2.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 4cd7ac0..48f1d4e 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1387,6 +1387,7 @@ static int omap_nand_remove(struct platform_device *pdev)
 	/* Release NAND device, its internal structures and partitions */
 	nand_release(&info->mtd);
 	iounmap(info->nand.IO_ADDR_R);
+	release_mem_region(info->phys_base, NAND_IO_SIZE);
 	kfree(info);
 	return 0;
 }
-- 
1.7.10.4


WARNING: multiple messages have this Message-ID (diff)
From: "Andreas Bießmann" <andreas@biessmann.de>
To: linux-kernel@vger.kernel.org
Cc: "Artem Bityutskiy" <artem.bityutskiy@linux.intel.com>,
	linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org,
	"Andreas Bießmann" <andreas@biessmann.de>
Subject: [PATCH 2/2] mtd/nand/omap2: fix module loading
Date: Fri, 31 Aug 2012 13:35:42 +0200	[thread overview]
Message-ID: <1346412942-4015-3-git-send-email-andreas@biessmann.de> (raw)
In-Reply-To: <1346412942-4015-1-git-send-email-andreas@biessmann.de>

Unloading the omap2 nand driver missed to release the memory region which will
result in not being able to request it again if one want to load the driver
later on.

This patch fixes following error when loading omap2 module after unloading:
---8<---
~ $ rmmod omap2
~ $ modprobe omap2
[   37.420928] omap2-nand: probe of omap2-nand.0 failed with error -16
~ $
--->8---

This error was introduced in 67ce04bf2746f8a1f8c2a104b313d20c63f68378 which
was the first commit of this driver.

Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
cc: linux-mtd@lists.infradead.org
---
 drivers/mtd/nand/omap2.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 4cd7ac0..48f1d4e 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1387,6 +1387,7 @@ static int omap_nand_remove(struct platform_device *pdev)
 	/* Release NAND device, its internal structures and partitions */
 	nand_release(&info->mtd);
 	iounmap(info->nand.IO_ADDR_R);
+	release_mem_region(info->phys_base, NAND_IO_SIZE);
 	kfree(info);
 	return 0;
 }
-- 
1.7.10.4


______________________________________________________
Linux MTD discussion mailing list
http://lists.infradead.org/mailman/listinfo/linux-mtd/

WARNING: multiple messages have this Message-ID (diff)
From: "Andreas Bießmann" <andreas@biessmann.de>
To: linux-kernel@vger.kernel.org
Cc: "Artem Bityutskiy" <artem.bityutskiy@linux.intel.com>,
	linux-omap@vger.kernel.org, linux-mtd@lists.infradead.org,
	"Andreas Bießmann" <andreas@biessmann.de>
Subject: [PATCH 2/2] mtd/nand/omap2: fix module loading
Date: Fri, 31 Aug 2012 13:35:42 +0200	[thread overview]
Message-ID: <1346412942-4015-3-git-send-email-andreas@biessmann.de> (raw)
In-Reply-To: <1346412942-4015-1-git-send-email-andreas@biessmann.de>

Unloading the omap2 nand driver missed to release the memory region which will
result in not being able to request it again if one want to load the driver
later on.

This patch fixes following error when loading omap2 module after unloading:
---8<---
~ $ rmmod omap2
~ $ modprobe omap2
[   37.420928] omap2-nand: probe of omap2-nand.0 failed with error -16
~ $
--->8---

This error was introduced in 67ce04bf2746f8a1f8c2a104b313d20c63f68378 which
was the first commit of this driver.

Signed-off-by: Andreas Bießmann <andreas@biessmann.de>
cc: linux-mtd@lists.infradead.org
---
 drivers/mtd/nand/omap2.c |    1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/mtd/nand/omap2.c b/drivers/mtd/nand/omap2.c
index 4cd7ac0..48f1d4e 100644
--- a/drivers/mtd/nand/omap2.c
+++ b/drivers/mtd/nand/omap2.c
@@ -1387,6 +1387,7 @@ static int omap_nand_remove(struct platform_device *pdev)
 	/* Release NAND device, its internal structures and partitions */
 	nand_release(&info->mtd);
 	iounmap(info->nand.IO_ADDR_R);
+	release_mem_region(info->phys_base, NAND_IO_SIZE);
 	kfree(info);
 	return 0;
 }
-- 
1.7.10.4

  parent reply	other threads:[~2012-08-31 11:55 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-08-31 11:35 [PATCH 0/2] fixes for omap2 nand driver Andreas Bießmann
2012-08-31 11:35 ` [PATCH 1/2] mtd/nand/omap2: fix omap_nand_remove segfault Andreas Bießmann
2012-08-31 11:35   ` Andreas Bießmann
2012-08-31 11:35   ` Andreas Bießmann
2012-08-31 11:57   ` Artem Bityutskiy
2012-08-31 11:57     ` Artem Bityutskiy
2012-08-31 11:35 ` Andreas Bießmann [this message]
2012-08-31 11:35   ` [PATCH 2/2] mtd/nand/omap2: fix module loading Andreas Bießmann
2012-08-31 11:35   ` Andreas Bießmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1346412942-4015-3-git-send-email-andreas@biessmann.de \
    --to=andreas@biessmann.de \
    --cc=artem.bityutskiy@linux.intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mtd@lists.infradead.org \
    --cc=linux-omap@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.