]> git.baikalelectronics.ru Git - kernel.git/commit
amd64-agp: run fallback when no bridges found, not when driver registration fails
authorBjorn Helgaas <bjorn.helgaas@hp.com>
Wed, 30 Jul 2008 19:26:51 +0000 (12:26 -0700)
committerDave Airlie <airlied@redhat.com>
Tue, 12 Aug 2008 00:13:37 +0000 (10:13 +1000)
commit7f585fd64680eb083f80a087e821572351687cfd
tree3802b06298c7f2796546e70779e1094bc585973f
parenta5bb60c5adeaf2911b6d63b778315c66f9f5845e
amd64-agp: run fallback when no bridges found, not when driver registration fails

I think the intent was that if no bridges matched agp_amd64_pci_table[],
we would fall back to checking for any bridge with the AGP capability.
But in the current code, we execute the fallback path only when
pci_register_driver() itself fails, which is unrelated to whether any
matching devices were found.

This patch counts the AGP bridges found in the probe() method and executes
the fallback path when none is found.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/char/agp/amd64-agp.c