* [RFT 2.6] generic.c: replace pci_find_device with pci_get_device
@ 2004-10-20 18:51 Hanna Linder
2004-10-20 22:02 ` [KJ] " Matthew Wilcox
0 siblings, 1 reply; 3+ messages in thread
From: Hanna Linder @ 2004-10-20 18:51 UTC (permalink / raw)
To: lkml, kernel-janitors; +Cc: Hanna Linder, greg, davej
As pci_find_device is going away soon I have converted this file to use
pci_get_device instead. I have compile tested it. If anyone has this hardware
and could test it that would be great.
Hanna Linder
IBM Linux Technology Center
Signed-off-by: Hanna Linder <hannal@us.ibm.com>
---
diff -Nrup linux-2.6.9cln/drivers/char/agp/generic.c linux-2.6.9patch/drivers/char/agp/generic.c
--- linux-2.6.9cln/drivers/char/agp/generic.c 2004-10-18 16:35:52.000000000 -0700
+++ linux-2.6.9patch/drivers/char/agp/generic.c 2004-10-18 17:20:56.000000000 -0700
@@ -507,7 +507,7 @@ u32 agp_collect_device_status(u32 mode,
u32 tmp;
u32 agp3;
- while ((device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, device)) != NULL) {
+ for_each_pci_dev(device) {
cap_ptr = pci_find_capability(device, PCI_CAP_ID_AGP);
if (!cap_ptr)
continue;
@@ -551,7 +551,7 @@ void agp_device_command(u32 command, int
if (agp_v3)
mode *= 4;
- while ((device = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, device)) != NULL) {
+ for_each_pci_dev(device) {
u8 agp = pci_find_capability(device, PCI_CAP_ID_AGP);
if (!agp)
continue;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [KJ] [RFT 2.6] generic.c: replace pci_find_device with pci_get_device
2004-10-20 18:51 [RFT 2.6] generic.c: replace pci_find_device with pci_get_device Hanna Linder
@ 2004-10-20 22:02 ` Matthew Wilcox
2004-10-20 22:07 ` Dave Jones
0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2004-10-20 22:02 UTC (permalink / raw)
To: Hanna Linder; +Cc: lkml, kernel-janitors, greg, davej
On Wed, Oct 20, 2004 at 11:51:17AM -0700, Hanna Linder wrote:
> As pci_find_device is going away soon I have converted this file to use
> pci_get_device instead. I have compile tested it. If anyone has this hardware
> and could test it that would be great.
Looks to me like this is a broken interface. We almost certainly want to
pass the agp_device to agp_collect_device_status and agp_device_command,
as noted in the comment to agp_collect_device_status. DaveJ?
--
"Next the statesmen will invent cheap lies, putting the blame upon
the nation that is attacked, and every man will be glad of those
conscience-soothing falsities, and will diligently study them, and refuse
to examine any refutations of them; and thus he will by and by convince
himself that the war is just, and will thank God for the better sleep
he enjoys after this process of grotesque self-deception." -- Mark Twain
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [KJ] [RFT 2.6] generic.c: replace pci_find_device with pci_get_device
2004-10-20 22:02 ` [KJ] " Matthew Wilcox
@ 2004-10-20 22:07 ` Dave Jones
0 siblings, 0 replies; 3+ messages in thread
From: Dave Jones @ 2004-10-20 22:07 UTC (permalink / raw)
To: Matthew Wilcox; +Cc: Hanna Linder, lkml, kernel-janitors, greg
On Wed, Oct 20, 2004 at 11:02:42PM +0100, Matthew Wilcox wrote:
> On Wed, Oct 20, 2004 at 11:51:17AM -0700, Hanna Linder wrote:
> > As pci_find_device is going away soon I have converted this file to use
> > pci_get_device instead. I have compile tested it. If anyone has this hardware
> > and could test it that would be great.
>
> Looks to me like this is a broken interface. We almost certainly want to
> pass the agp_device to agp_collect_device_status and agp_device_command,
> as noted in the comment to agp_collect_device_status. DaveJ?
It ain't pretty, but I probably won't find time to clean that up
any time soon. This doesn't impact Hanna's patch however.
Dave
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-10-20 22:36 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-10-20 18:51 [RFT 2.6] generic.c: replace pci_find_device with pci_get_device Hanna Linder
2004-10-20 22:02 ` [KJ] " Matthew Wilcox
2004-10-20 22:07 ` Dave Jones
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome