From: Tejun Heo <htejun@gmail.com>
To: Jeff Garzik <jeff@garzik.org>
Cc: gregkh@suse.de, alan@lxorguk.ukuu.org.uk,
linux-kernel@vger.kernel.org, linux-ide@vger.kernel.org
Subject: [PATCH 1/2] pata_platform: fix devres conversion
Date: Thu, 1 Feb 2007 15:05:22 +0900 [thread overview]
Message-ID: <20070201060522.GK8606@htj.dyndns.org> (raw)
In-Reply-To: <45C0827C.2050207@garzik.org>
devres updates for pata_platform were dropped while merging devres
patches due to merge conflict. This is the updated version.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
drivers/ata/pata_platform.c | 31 +++++++------------------------
1 file changed, 7 insertions(+), 24 deletions(-)
Index: work/drivers/ata/pata_platform.c
===================================================================
--- work.orig/drivers/ata/pata_platform.c
+++ work/drivers/ata/pata_platform.c
@@ -47,23 +47,6 @@ static int pata_platform_set_mode(struct
return 0;
}
-static void pata_platform_host_stop(struct ata_host *host)
-{
- int i;
-
- /*
- * Unmap the bases for MMIO
- */
- for (i = 0; i < host->n_ports; i++) {
- struct ata_port *ap = host->ports[i];
-
- if (ap->flags & ATA_FLAG_MMIO) {
- iounmap((void __iomem *)ap->ioaddr.ctl_addr);
- iounmap((void __iomem *)ap->ioaddr.cmd_addr);
- }
- }
-}
-
static struct scsi_host_template pata_platform_sht = {
.module = THIS_MODULE,
.name = DRV_NAME,
@@ -106,8 +89,6 @@ static struct ata_port_operations pata_p
.irq_clear = ata_bmdma_irq_clear,
.port_start = ata_port_start,
- .port_stop = ata_port_stop,
- .host_stop = pata_platform_host_stop
};
static void pata_platform_setup_port(struct ata_ioports *ioaddr,
@@ -209,15 +190,17 @@ static int __devinit pata_platform_probe
if (mmio) {
ae.port_flags |= ATA_FLAG_MMIO;
- ae.port[0].cmd_addr = (unsigned long)ioremap(io_res->start,
- io_res->end - io_res->start + 1);
+ ae.port[0].cmd_addr = (unsigned long)
+ devm_ioremap(&pdev->dev, io_res->start,
+ io_res->end - io_res->start + 1);
if (unlikely(!ae.port[0].cmd_addr)) {
dev_err(&pdev->dev, "failed to remap IO base\n");
return -ENXIO;
}
- ae.port[0].ctl_addr = (unsigned long)ioremap(ctl_res->start,
- ctl_res->end - ctl_res->start + 1);
+ ae.port[0].ctl_addr = (unsigned long)
+ devm_ioremap(&pdev->dev, ctl_res->start,
+ ctl_res->end - ctl_res->start + 1);
if (unlikely(!ae.port[0].ctl_addr)) {
dev_err(&pdev->dev, "failed to remap CTL base\n");
ret = -ENXIO;
@@ -261,7 +244,7 @@ static int __devexit pata_platform_remov
struct device *dev = &pdev->dev;
struct ata_host *host = dev_get_drvdata(dev);
- ata_host_remove(host);
+ ata_host_detach(host);
dev_set_drvdata(dev, NULL);
return 0;
next prev parent reply other threads:[~2007-02-01 6:05 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-01-20 7:00 [PATCHSET] Managed device resources, take #3 Tejun Heo
2007-01-20 7:00 ` [PATCH 1/7] devres: device resource management Tejun Heo
2007-01-31 11:50 ` Jeff Garzik
2007-02-01 6:05 ` Tejun Heo [this message]
2007-02-02 16:55 ` [PATCH 1/2] pata_platform: fix devres conversion Jeff Garzik
2007-01-20 7:00 ` [PATCH 2/7] libata: implement ata_host_detach() Tejun Heo
2007-01-20 7:00 ` [PATCH 5/7] libata: remove unused functions Tejun Heo
2007-01-20 7:00 ` [PATCH 3/7] libata: update libata core layer to use devres Tejun Heo
2007-01-20 7:00 ` [PATCH 6/7] devres: implement pcim_iomap_regions() Tejun Heo
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=20070201060522.GK8606@htj.dyndns.org \
--to=htejun@gmail.com \
--cc=alan@lxorguk.ukuu.org.uk \
--cc=gregkh@suse.de \
--cc=jeff@garzik.org \
--cc=linux-ide@vger.kernel.org \
--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
all inboxes | Powered by JetHome®