mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
To: barebox@lists.infradead.org
Subject: [PATCH 2/8] atmel/drivers: switch to dev_request_mem_region
Date: Tue, 19 Jul 2011 19:17:23 +0200	[thread overview]
Message-ID: <1311095849-16071-2-git-send-email-plagnioj@jcrosoft.com> (raw)
In-Reply-To: <1311095849-16071-1-git-send-email-plagnioj@jcrosoft.com>

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
---
 drivers/mci/atmel_mci.c       |    2 +-
 drivers/mtd/nand/atmel_nand.c |    2 +-
 drivers/net/macb.c            |    2 +-
 drivers/serial/atmel.c        |    2 +-
 4 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/mci/atmel_mci.c b/drivers/mci/atmel_mci.c
index 70041ba..b4489dd 100644
--- a/drivers/mci/atmel_mci.c
+++ b/drivers/mci/atmel_mci.c
@@ -456,7 +456,7 @@ static int mci_probe(struct device_d *hw_dev)
 	if (pd->bus_width == 8)
 		host->mci.host_caps |= MMC_MODE_8BIT;
 
-	host->base = (void __iomem *)hw_dev->resource[0].start;
+	host->base = dev_request_mem_region(hw_dev, 0);
 	host->hw_dev = hw_dev;
 	hw_dev->priv = host;
 	host->clk = clk_get(hw_dev, "mci_clk");
diff --git a/drivers/mtd/nand/atmel_nand.c b/drivers/mtd/nand/atmel_nand.c
index 937bb70..f79be9a 100644
--- a/drivers/mtd/nand/atmel_nand.c
+++ b/drivers/mtd/nand/atmel_nand.c
@@ -381,7 +381,7 @@ static int __init atmel_nand_probe(struct device_d *dev)
 	if (!host)
 		return -ENOMEM;
 
-	host->io_base = (void __iomem *)dev->resource[0].start;
+	host->io_base = dev_request_mem_region(dev, 0);
 
 	mtd = &host->mtd;
 	nand_chip = &host->nand_chip;
diff --git a/drivers/net/macb.c b/drivers/net/macb.c
index e030154..95ad3d7 100644
--- a/drivers/net/macb.c
+++ b/drivers/net/macb.c
@@ -446,7 +446,7 @@ static int macb_probe(struct device_d *dev)
 	macb->rx_ring = xmalloc(CFG_MACB_RX_RING_SIZE * sizeof(struct macb_dma_desc));
 	macb->tx_ring = xmalloc(sizeof(struct macb_dma_desc));
 
-	macb->regs = (void __iomem *)dev->resource[0].start;
+	macb->regs = dev_request_mem_region(dev, 0);
 
 	/*
 	 * Do some basic initialization so that we at least can talk
diff --git a/drivers/serial/atmel.c b/drivers/serial/atmel.c
index d8713b3..ff0e75e 100644
--- a/drivers/serial/atmel.c
+++ b/drivers/serial/atmel.c
@@ -375,7 +375,7 @@ static int atmel_serial_init_port(struct console_device *cdev)
 	struct device_d *dev = cdev->dev;
 	struct atmel_uart_port *uart = to_atmel_uart_port(cdev);
 
-	uart->base = (void __iomem *)dev->resource[0].start;
+	uart->base = dev_request_mem_region(dev, 0);
 	uart->clk = clk_get(dev, "usart");
 	clk_enable(uart->clk);
 	uart->uartclk = clk_get_rate(uart->clk);
-- 
1.7.5.4


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2011-07-19 17:34 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-07-19 17:17 [PATCH 1/8] at91: add missing IORESOURCE_MEM flags to resources Jean-Christophe PLAGNIOL-VILLARD
2011-07-19 17:17 ` Jean-Christophe PLAGNIOL-VILLARD [this message]
2011-07-19 17:17 ` [PATCH 3/8] dm9000: switch to dev_request_mem_region Jean-Christophe PLAGNIOL-VILLARD
2011-07-19 17:17 ` [PATCH 4/8] nomadik: add missing IORESOURCE_MEM flags to resources Jean-Christophe PLAGNIOL-VILLARD
2011-07-19 17:17 ` [PATCH 5/8] nomadik/nand: switch to dev_request_mem_region Jean-Christophe PLAGNIOL-VILLARD
2011-07-19 17:17 ` [PATCH 6/8] amba-pl011: fix missing switch to "struct resource" Jean-Christophe PLAGNIOL-VILLARD
2011-07-19 17:17 ` [PATCH 7/8] amba-pl011: switch to dev_request_mem_region Jean-Christophe PLAGNIOL-VILLARD
2011-07-19 17:17 ` [PATCH 8/8] armlinux: mem tag switch to "struct resource" Jean-Christophe PLAGNIOL-VILLARD

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=1311095849-16071-2-git-send-email-plagnioj@jcrosoft.com \
    --to=plagnioj@jcrosoft.com \
    --cc=barebox@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