From: Jeff Garzik <jgarzik@mandrakesoft.com>
To: Pete Wyckoff <pw@osc.edu>
Cc: vojtech@suse.cz, linux-kernel@vger.kernel.org
Subject: Re: ns558 pci/isa change
Date: Mon, 13 Nov 2000 18:52:23 -0500 [thread overview]
Message-ID: <3A107EB7.542B997B@mandrakesoft.com> (raw)
In-Reply-To: <20001113181530.A7954@quasar.osc.edu>
[-- Attachment #1: Type: text/plain, Size: 444 bytes --]
Pete Wyckoff wrote:
> i = pci_module_init(&ns558_pci_driver);
> if (i == 0)
> have_pci_devices = 1;
>
> /*
> * Probe for ISA ports.
> */
>
> + i = 0;
you don't want to lose the error code. what you want to do is something
like the attached patch...
--
Jeff Garzik |
Building 1024 | The chief enemy of creativity is "good" sense
MandrakeSoft | -- Picasso
[-- Attachment #2: ns558.patch --]
[-- Type: text/plain, Size: 1040 bytes --]
Index: drivers/char/joystick/ns558.c
===================================================================
RCS file: /cvsroot/gkernel/linux_2_4/drivers/char/joystick/ns558.c,v
retrieving revision 1.1.1.3
diff -u -r1.1.1.3 ns558.c
--- drivers/char/joystick/ns558.c 2000/10/22 23:21:03 1.1.1.3
+++ drivers/char/joystick/ns558.c 2000/11/13 23:51:49
@@ -58,7 +58,6 @@
};
static struct ns558 *ns558;
-static int have_pci_devices;
/*
* ns558_isa_probe() tries to find an isa gameport at the
@@ -316,9 +315,8 @@
* it is the least-invasive probe.
*/
- i = pci_module_init(&ns558_pci_driver);
- if (i == 0)
- have_pci_devices = 1;
+ i = pci_register_driver(&ns558_pci_driver);
+ if (i < 0) return i;
/*
* Probe for ISA ports.
@@ -339,7 +337,7 @@
}
#endif
- return ns558 ? 0 : -ENODEV;
+ return 0;
}
void __exit ns558_exit(void)
@@ -368,8 +366,7 @@
port = port->next;
}
- if (have_pci_devices)
- pci_unregister_driver(&ns558_pci_driver);
+ pci_unregister_driver(&ns558_pci_driver);
}
module_init(ns558_init);
prev parent reply other threads:[~2000-11-14 0:22 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-13 23:15 ns558 pci/isa change Pete Wyckoff
2000-11-13 23:52 ` Jeff Garzik [this message]
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=3A107EB7.542B997B@mandrakesoft.com \
--to=jgarzik@mandrakesoft.com \
--cc=linux-kernel@vger.kernel.org \
--cc=pw@osc.edu \
--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