lkml.org 
[lkml]   [2004]   [Sep]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: [PATCH] fix improper use of pci_module_init() in drivers/char/agp/amd64-agp.c
On Thu, Sep 30, 2004 at 11:42:48AM -0700, Greg KH wrote:
> Hi,
>
> In going through the tree and auditing the usage of pci_module_init(), I
> noticed that the amd64-agp driver was assuming that the return value of
> this function could be greater than 0 (which is what could happen in 2.2
> and 2.4 kernels.) As this is no longer true, I think the following
> patch is correct.
>
> I can add this to my bk-pci tree if you wish, otherwise feel free to
> send it upwards.

There needs to be some replacement for it, you cannot just delete
the code.


The idea is to run it as fallback when no devices are found.

How about this patch?

-Andi



diff -u linux-2.6.9rc3-work/drivers/char/agp/amd64-agp.c-o linux-2.6.9rc3-work/drivers/char/agp/amd64-agp.c
--- linux-2.6.9rc3-work/drivers/char/agp/amd64-agp.c-o 2004-09-30 10:35:07.000000000 +0200
+++ linux-2.6.9rc3-work/drivers/char/agp/amd64-agp.c 2004-09-30 21:19:00.000000000 +0200
@@ -627,7 +627,7 @@
int err = 0;
if (agp_off)
return -EINVAL;
- if (pci_module_init(&agp_amd64_pci_driver) > 0) {
+ if (pci_module_init(&agp_amd64_pci_driver) < 0) {
struct pci_dev *dev;
if (!agp_try_unsupported && !agp_try_unsupported_boot) {
printk(KERN_INFO PFX "No supported AGP bridge found.\n");

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 14:06    [W:1.679 / U:0.228 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site