public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Magnus Damm <magnus.damm@gmail.com>
To: linux-kernel@vger.kernel.org
Cc: drzeus-wbsd@drzeus.cx, Magnus Damm <magnus.damm@gmail.com>,
	ian@mnementh.co.uk, akpm@linux-foundation.org
Subject: [PATCH 01/05] tmio_mmc: Fix one off, use resource_size() in probe()
Date: Wed, 11 Mar 2009 21:58:54 +0900	[thread overview]
Message-ID: <20090311125854.1563.34525.sendpatchset@rx1.opensource.se> (raw)
In-Reply-To: <20090311125845.1563.31960.sendpatchset@rx1.opensource.se>

From:  Magnus Damm <damm@opensource.se>

Update the tmio_mmc code to use resource_size(). With this
patch applied the correct resource size is passed to ioremap().

Signed-off-by: Magnus Damm <damm@opensource.se>
---

 drivers/mmc/host/tmio_mmc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

--- 0001/drivers/mmc/host/tmio_mmc.c
+++ work/drivers/mmc/host/tmio_mmc.c	2009-01-29 16:08:04.000000000 +0900
@@ -568,11 +568,11 @@ static int __devinit tmio_mmc_probe(stru
 	host->mmc = mmc;
 	platform_set_drvdata(dev, mmc);
 
-	host->ctl = ioremap(res_ctl->start, res_ctl->end - res_ctl->start);
+	host->ctl = ioremap(res_ctl->start, resource_size(res_ctl));
 	if (!host->ctl)
 		goto host_free;
 
-	host->cnf = ioremap(res_cnf->start, res_cnf->end - res_cnf->start);
+	host->cnf = ioremap(res_cnf->start, resource_size(res_cnf));
 	if (!host->cnf)
 		goto unmap_ctl;
 

  reply	other threads:[~2009-03-11 13:01 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-03-11 12:58 [PATCH 00/05] tmio_mmc: Minor fixes and cnf/irq changes Magnus Damm
2009-03-11 12:58 ` Magnus Damm [this message]
2009-03-11 14:26   ` [PATCH 01/05] tmio_mmc: Fix one off, use resource_size() in probe() Ian Molton
2009-03-11 12:59 ` [PATCH 02/05] tmio_mmc: Fix use after free in remove() Magnus Damm
2009-03-11 14:28   ` Ian Molton
2009-03-11 12:59 ` [PATCH 03/05] tmio_mmc: Break out cnf area operations Magnus Damm
2009-03-11 14:39   ` Ian Molton
2009-03-12  2:13     ` Magnus Damm
2009-03-11 12:59 ` [PATCH 04/05] tmio_mmc: Make cnf area optional Magnus Damm
2009-03-11 12:59 ` [PATCH 05/05] tmio_mmc: Support multiple interrupts Magnus Damm
2009-03-11 14:21   ` Ian Molton
2009-03-12  1:45     ` Magnus Damm
2009-03-16 18:30 ` [PATCH 00/05] tmio_mmc: Minor fixes and cnf/irq changes Pierre Ossman
2009-03-18  1:58   ` Magnus Damm
2009-03-24  2:07     ` Ian Molton
2009-03-25  8:56       ` Magnus Damm
2009-03-31  2:51         ` Magnus Damm
2009-03-31 18:37           ` Ian Molton
2009-04-01  2:20             ` Magnus Damm
2009-04-01 19:00               ` Ian Molton
2009-03-24  2:00   ` Ian Molton
2009-03-24 20:05     ` Pierre Ossman

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=20090311125854.1563.34525.sendpatchset@rx1.opensource.se \
    --to=magnus.damm@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=drzeus-wbsd@drzeus.cx \
    --cc=ian@mnementh.co.uk \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox