linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: aaro.koskinen@nokia.com (Aaro Koskinen)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 3/6] arm: mach-omap2: smartreflex: request the memory region
Date: Thu, 24 Mar 2011 18:35:32 +0200	[thread overview]
Message-ID: <1300984535-10530-3-git-send-email-aaro.koskinen@nokia.com> (raw)
In-Reply-To: <1300984535-10530-1-git-send-email-aaro.koskinen@nokia.com>

We are releasing the memory region, but never actually request it.

Signed-off-by: Aaro Koskinen <aaro.koskinen@nokia.com>
---
 arch/arm/mach-omap2/smartreflex.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/arch/arm/mach-omap2/smartreflex.c b/arch/arm/mach-omap2/smartreflex.c
index 6dfc8db..81bd5ed 100644
--- a/arch/arm/mach-omap2/smartreflex.c
+++ b/arch/arm/mach-omap2/smartreflex.c
@@ -847,6 +847,14 @@ static int __init omap_sr_probe(struct platform_device *pdev)
 		goto err_free_devinfo;
 	}
 
+	mem = request_mem_region(mem->start, resource_size(mem),
+					dev_name(&pdev->dev));
+	if (!mem) {
+		dev_err(&pdev->dev, "%s: no mem region\n", __func__);
+		ret = -EBUSY;
+		goto err_free_devinfo;
+	}
+
 	irq = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
 
 	pm_runtime_enable(&pdev->dev);
-- 
1.5.6.5

  parent reply	other threads:[~2011-03-24 16:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-24 16:35 [PATCH 1/6] arm: mach-omap2: omap_l3_smx: fix request_irq() error path Aaro Koskinen
2011-03-24 16:35 ` [PATCH 2/6] arm: mach-omap2: smartreflex: fix sr_late_init() error path in probe Aaro Koskinen
2011-03-24 17:18   ` Kevin Hilman
2011-03-25  3:50     ` Nishanth Menon
2011-03-25 14:51       ` Kevin Hilman
2011-03-24 16:35 ` Aaro Koskinen [this message]
2011-03-24 16:35 ` [PATCH 4/6] arm: mach-omap2: smartreflex: fix ioremap leak on probe error Aaro Koskinen
2011-03-24 16:35 ` [PATCH 5/6] arm: mach-omap2: smartreflex: delete instance from sr_list " Aaro Koskinen
2011-03-24 16:35 ` [PATCH 6/6] arm: mach-omap2: smartreflex: delete debugfs entries " Aaro Koskinen

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=1300984535-10530-3-git-send-email-aaro.koskinen@nokia.com \
    --to=aaro.koskinen@nokia.com \
    --cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).