From: Pete Wyckoff <pw@osc.edu>
To: vojtech@suse.cz
Cc: linux-kernel@vger.kernel.org
Subject: ns558 pci/isa change
Date: Mon, 13 Nov 2000 18:15:30 -0500 [thread overview]
Message-ID: <20001113181530.A7954@quasar.osc.edu> (raw)
My joystick stopped working at 2.4.0-test10 due to a patch to
drivers/char/joystick/ns558.c that moves pci probing ahead of
isa probing.
The problem is that pci_module_init can return -ENODEV into i,
which is then used to index the ISA portlist. ISA probing assumes
that i is initialized to zero.
Trivial fix attached, with plenty of context.
-- Pete
--- drivers/char/joystick/ns558.c.orig Mon Nov 13 18:04:16 2000
+++ drivers/char/joystick/ns558.c Mon Nov 13 18:11:41 2000
@@ -299,37 +299,38 @@
deactivate:
if (dev->deactivate)
dev->deactivate(dev);
return next;
}
#endif
int __init ns558_init(void)
{
- int i = 0;
+ int i;
#ifdef NSS558_ISAPNP
struct pci_dev *dev = NULL;
struct pnp_devid *devid;
#endif
/*
* Probe for PCI ports. Always probe for PCI first,
* it is the least-invasive probe.
*/
i = pci_module_init(&ns558_pci_driver);
if (i == 0)
have_pci_devices = 1;
/*
* Probe for ISA ports.
*/
+ i = 0;
while (ns558_isa_portlist[i])
ns558 = ns558_isa_probe(ns558_isa_portlist[i++], ns558);
/*
* Probe for PnP ports.
*/
#ifdef NSS558_ISAPNP
for (devid = pnp_devids; devid->vendor; devid++) {
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next reply other threads:[~2000-11-13 23:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-13 23:15 Pete Wyckoff [this message]
2000-11-13 23:52 ` ns558 pci/isa change Jeff Garzik
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=20001113181530.A7954@quasar.osc.edu \
--to=pw@osc.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@suse.cz \
/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