From: Tejun Heo <htejun@gmail.com>
To: jgarzik@pobox.com, linux-ide@vger.kernel.org
Cc: Tejun Heo <htejun@gmail.com>
Subject: [PATCH 2/7] sata_nv: kill struct nv_host
Date: Wed, 14 Jun 2006 06:31:03 +0900 [thread overview]
Message-ID: <11502342631698-git-send-email-htejun@gmail.com> (raw)
In-Reply-To: <11502342632913-git-send-email-htejun@gmail.com>
struct nv_host is sata_nv's host_set->private_data. It contains two
fields nv_host_desc which points to a static desc entry and unused
host_flags. Kill nv_host and make host_set->private_data directly
point to the nv_host_desc entry.
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
drivers/scsi/sata_nv.c | 24 ++----------------------
1 files changed, 2 insertions(+), 22 deletions(-)
43cafdaf0396f38f989c6538777f69ac5397cbc4
diff --git a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c
index 716581e..ee674dd 100644
--- a/drivers/scsi/sata_nv.c
+++ b/drivers/scsi/sata_nv.c
@@ -156,12 +156,6 @@ static struct nv_host_desc nv_device_tbl
},
};
-struct nv_host
-{
- struct nv_host_desc *host_desc;
- unsigned long host_flags;
-};
-
static struct pci_driver nv_pci_driver = {
.name = DRV_NAME,
.id_table = nv_pci_tbl,
@@ -290,17 +284,12 @@ static void nv_scr_write (struct ata_por
static void nv_host_stop (struct ata_host_set *host_set)
{
- struct nv_host *host = host_set->private_data;
-
- kfree(host);
-
ata_pci_host_stop(host_set);
}
static int nv_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
{
static int printed_version = 0;
- struct nv_host *host;
struct ata_port_info *ppi;
struct ata_probe_ent *probe_ent;
int pci_dev_busy = 0;
@@ -342,19 +331,12 @@ static int nv_init_one (struct pci_dev *
if (!probe_ent)
goto err_out_regions;
- host = kmalloc(sizeof(struct nv_host), GFP_KERNEL);
- if (!host)
- goto err_out_free_ent;
-
- memset(host, 0, sizeof(struct nv_host));
- host->host_desc = &nv_device_tbl[ent->driver_data];
-
- probe_ent->private_data = host;
+ probe_ent->private_data = &nv_device_tbl[ent->driver_data];
probe_ent->mmio_base = pci_iomap(pdev, 5, 0);
if (!probe_ent->mmio_base) {
rc = -EIO;
- goto err_out_free_host;
+ goto err_out_free_ent;
}
base = (unsigned long)probe_ent->mmio_base;
@@ -374,8 +356,6 @@ static int nv_init_one (struct pci_dev *
err_out_iounmap:
pci_iounmap(pdev, probe_ent->mmio_base);
-err_out_free_host:
- kfree(host);
err_out_free_ent:
kfree(probe_ent);
err_out_regions:
--
1.3.2
next prev parent reply other threads:[~2006-06-13 21:30 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-06-13 21:31 [PATCHSET] sata_nv: convert to new EH and add hotplug support Tejun Heo
2006-06-13 21:31 ` Tejun Heo [this message]
2006-06-13 21:31 ` [PATCH 1/7] sata_nv: kill not-working hotplug code Tejun Heo
2006-06-13 21:31 ` [PATCH 3/7] sata_nv: simplify interrupt constants Tejun Heo
2006-06-13 21:31 ` [PATCH 7/7] sata_nv: add hotplug support Tejun Heo
2006-06-13 21:31 ` [PATCH 5/7] sata_nv: improve irq handler Tejun Heo
2006-06-13 21:31 ` [PATCH 4/7] sata_nv: implement irq manipulation methods Tejun Heo
2006-06-14 1:00 ` Jeff Garzik
2006-06-14 13:47 ` Tejun Heo
2006-06-13 21:31 ` [PATCH 6/7] sata_nv: implement new EH 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=11502342631698-git-send-email-htejun@gmail.com \
--to=htejun@gmail.com \
--cc=jgarzik@pobox.com \
--cc=linux-ide@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;
as well as URLs for NNTP newsgroup(s).