From: Jeff Garzik <jeff@garzik.org>
To: LKML <linux-kernel@vger.kernel.org>, linux-ide@vger.kernel.org
Cc: akpm@linux-foundation.org
Subject: [PATCH 1/3] [IDE] Add helper __ide_setup_pci_device()
Date: Wed, 24 Oct 2007 19:48:20 -0400 (EDT) [thread overview]
Message-ID: <20071024234820.D91351F81A1@havoc.gtf.org> (raw)
In-Reply-To: <09821349085390234lkjasdflkjasflkdj24746@havoc.gtf.org>
Like ide_setup_pci_device(), except with additional array argument
'u8 *idx' that permits low-level driver to become aware of its assigned
hwifs.
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
---
drivers/ide/setup-pci.c | 17 ++++++++++++-----
include/linux/ide.h | 1 +
2 files changed, 13 insertions(+), 5 deletions(-)
diff --git a/drivers/ide/setup-pci.c b/drivers/ide/setup-pci.c
index 02d14bf..4960b9f 100644
--- a/drivers/ide/setup-pci.c
+++ b/drivers/ide/setup-pci.c
@@ -666,12 +666,10 @@ out:
return ret;
}
-int ide_setup_pci_device(struct pci_dev *dev, const struct ide_port_info *d)
+int __ide_setup_pci_device(struct pci_dev *dev, const struct ide_port_info *d,
+ u8 *idx)
{
- u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
- int ret;
-
- ret = do_ide_setup_pci_device(dev, d, &idx[0], 1);
+ int ret = do_ide_setup_pci_device(dev, d, idx, 1);
if (ret >= 0)
ide_device_add(idx);
@@ -679,6 +677,15 @@ int ide_setup_pci_device(struct pci_dev *dev, const struct ide_port_info *d)
return ret;
}
+EXPORT_SYMBOL_GPL(__ide_setup_pci_device);
+
+int ide_setup_pci_device(struct pci_dev *dev, const struct ide_port_info *d)
+{
+ u8 idx[4] = { 0xff, 0xff, 0xff, 0xff };
+
+ return __ide_setup_pci_device(dev, d, &idx[0]);
+}
+
EXPORT_SYMBOL_GPL(ide_setup_pci_device);
int ide_setup_pci_devices(struct pci_dev *dev1, struct pci_dev *dev2,
diff --git a/include/linux/ide.h b/include/linux/ide.h
index 4ed4777..3404fb9 100644
--- a/include/linux/ide.h
+++ b/include/linux/ide.h
@@ -1244,6 +1244,7 @@ struct ide_port_info {
u8 udma_mask;
};
+int __ide_setup_pci_device(struct pci_dev *, const struct ide_port_info *, u8 *);
int ide_setup_pci_device(struct pci_dev *, const struct ide_port_info *);
int ide_setup_pci_devices(struct pci_dev *, struct pci_dev *, const struct ide_port_info *);
--
1.5.2.4
next prev parent reply other threads:[~2007-10-24 23:48 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-24 23:48 [PATCH] sound/oss/pss: set_io_base() always returns success, mark it void Jeff Garzik
2007-10-24 23:48 ` Jeff Garzik [this message]
2007-10-25 19:33 ` [PATCH 1/3] [IDE] Add helper __ide_setup_pci_device() Bartlomiej Zolnierkiewicz
2007-10-24 23:48 ` [PATCH 2/3] drivers/ide/pci/sc1200.c: remove pointless hwif lookup loop Jeff Garzik
2007-10-25 20:01 ` Bartlomiej Zolnierkiewicz
2007-10-26 1:25 ` Jeff Garzik
2007-10-31 21:53 ` Bartlomiej Zolnierkiewicz
2007-10-24 23:48 ` [PATCH 3/3] drivers/ide/pci/sc1200.c: fix suspend/resume buglets and warnings Jeff Garzik
2007-10-25 20:10 ` Bartlomiej Zolnierkiewicz
2007-10-24 23:48 ` [PATCH 1/4] [SCSI] ips: remove ips_ha members that duplicate struct pci_dev members Jeff Garzik
2007-10-25 4:27 ` Andrew Morton
2007-10-25 5:09 ` Jeff Garzik
2007-10-25 14:32 ` Salyzyn, Mark
2007-10-25 22:42 ` Jeff Garzik
2007-10-24 23:48 ` [PATCH 2/4] [SCSI] ips: trim trailing whitespace Jeff Garzik
2007-10-25 14:33 ` Salyzyn, Mark
2007-10-24 23:48 ` [PATCH 3/4] [SCSI] ips: PCI API cleanups Jeff Garzik
2007-10-25 6:54 ` Rolf Eike Beer
2007-10-25 14:37 ` Salyzyn, Mark
2007-10-24 23:48 ` [PATCH 4/4] [SCSI] ips: handle scsi_add_host() failure, and other err cleanups Jeff Garzik
2007-10-25 14:39 ` Salyzyn, Mark
2007-10-24 23:48 ` [PATCH] [libata] fix 'if(' and similar areas that lack whitespace Jeff Garzik
2007-10-25 15:35 ` Richard Knutsson
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=20071024234820.D91351F81A1@havoc.gtf.org \
--to=jeff@garzik.org \
--cc=akpm@linux-foundation.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®