From: Greg KH <greg@kroah.com>
To: linux-kernel@vger.kernel.org, sensors@stimpy.netroedge.com
Subject: Re: [PATCH] i2c driver changes for 2.5.64
Date: Thu, 13 Mar 2003 16:55 -0800 [thread overview]
Message-ID: <1047603318248@kroah.com> (raw)
In-Reply-To: <10476033153504@kroah.com>
ChangeSet 1.1106, 2003/03/13 10:50:41-08:00, greg@kroah.com
i2c: get i2c-ali15x3 driver to actually bind to a PCI device.
drivers/i2c/busses/i2c-ali15x3.c | 32 +++++++++-----------------------
1 files changed, 9 insertions(+), 23 deletions(-)
diff -Nru a/drivers/i2c/busses/i2c-ali15x3.c b/drivers/i2c/busses/i2c-ali15x3.c
--- a/drivers/i2c/busses/i2c-ali15x3.c Thu Mar 13 16:57:58 2003
+++ b/drivers/i2c/busses/i2c-ali15x3.c Thu Mar 13 16:57:58 2003
@@ -135,32 +135,11 @@
static unsigned short ali15x3_smba = 0;
-/* Detect whether a ALI15X3 can be found, and initialize it, where necessary.
- Note the differences between kernels with the old PCI BIOS interface and
- newer kernels with the real PCI interface. In compat.h some things are
- defined to make the transition easier. */
-int ali15x3_setup(void)
+int ali15x3_setup(struct pci_dev *ALI15X3_dev)
{
u16 a;
unsigned char temp;
- struct pci_dev *ALI15X3_dev;
-
- /* First check whether we can access PCI at all */
- if (pci_present() == 0) {
- printk("i2c-ali15x3.o: Error: No PCI-bus found!\n");
- return -ENODEV;
- }
-
- /* Look for the ALI15X3, M7101 device */
- ALI15X3_dev = NULL;
- ALI15X3_dev = pci_find_device(PCI_VENDOR_ID_AL,
- PCI_DEVICE_ID_AL_M7101, ALI15X3_dev);
- if (ALI15X3_dev == NULL) {
- printk("i2c-ali15x3.o: Error: Can't detect ali15x3!\n");
- return -ENODEV;
- }
-
/* Check the following things:
- SMB I/O address is initialized
- Device is enabled
@@ -534,12 +513,18 @@
static struct pci_device_id ali15x3_ids[] __devinitdata = {
+ {
+ .vendor = PCI_VENDOR_ID_AL,
+ .device = PCI_DEVICE_ID_AL_M7101,
+ .subvendor = PCI_ANY_ID,
+ .subdevice = PCI_ANY_ID,
+ },
{ 0, }
};
static int __devinit ali15x3_probe(struct pci_dev *dev, const struct pci_device_id *id)
{
- if (ali15x3_setup()) {
+ if (ali15x3_setup(dev)) {
printk
("i2c-ali15x3.o: ALI15X3 not detected, module not inserted.\n");
@@ -549,6 +534,7 @@
sprintf(ali15x3_adapter.name, "SMBus ALI15X3 adapter at %04x",
ali15x3_smba);
i2c_add_adapter(&ali15x3_adapter);
+ return 0;
}
static void __devexit ali15x3_remove(struct pci_dev *dev)
next prev parent reply other threads:[~2003-03-14 0:57 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-03-14 0:50 [BK PATCH] i2c driver changes for 2.5.64 Greg KH
2003-03-14 0:55 ` [PATCH] " Greg KH
2003-03-14 0:55 ` Greg KH [this message]
2003-03-14 0:55 ` Greg KH
2003-03-14 0:55 ` Greg KH
2003-03-14 0:55 ` Greg KH
2003-03-14 0:55 ` Greg KH
2003-03-14 0:55 ` Greg KH
2003-03-14 0:55 ` Greg KH
2003-03-14 0:55 ` Greg KH
2003-03-14 0:55 ` Greg KH
2003-03-15 9:49 ` Vojtech Pavlik
2003-03-15 21:46 ` Greg KH
2003-03-15 22:06 ` Vojtech Pavlik
2003-03-14 8:28 ` Christoph Hellwig
2003-03-14 8:21 ` Christoph Hellwig
2003-03-14 8:53 ` Greg KH
2003-03-14 8:19 ` Christoph Hellwig
2003-03-14 8:56 ` Greg KH
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=1047603318248@kroah.com \
--to=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sensors@stimpy.netroedge.com \
/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