* [KJ] [PATCH] replace pci_find_device with pci_get_device in
@ 2006-11-19 23:31 trem
0 siblings, 0 replies; only message in thread
From: trem @ 2006-11-19 23:31 UTC (permalink / raw)
To: kernel-janitors
[-- Attachment #1: Type: text/plain, Size: 255 bytes --]
From: trem <tremyfr@yahoo.fr>
This patch simply replaces pci_find_device by pci_get_device, because
pci_find_device is deprecated. pci_dev_put has been added to decrement
the counter, so unload could be done.
Signed-Off-By: trem <tremyfr@yahoo.fr>
---
[-- Attachment #2: longhaul_replace_pci_find_device_by_pci_get_device.patch --]
[-- Type: text/x-patch, Size: 942 bytes --]
diff --git a/arch/i386/kernel/cpu/cpufreq/longhaul.c b/arch/i386/kernel/cpu/cpufreq/longhaul.c
index 7233abe..37c28f9 100644
--- a/arch/i386/kernel/cpu/cpufreq/longhaul.c
+++ b/arch/i386/kernel/cpu/cpufreq/longhaul.c
@@ -578,11 +578,11 @@ static int enable_arbiter_disable(void)
/* Find PLE133 host bridge */
reg = 0x78;
- dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8601_0, NULL);
+ dev = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8601_0, NULL);
/* Find CLE266 host bridge */
if (dev == NULL) {
reg = 0x76;
- dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_862X_0, NULL);
+ dev = pci_get_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_862X_0, NULL);
}
if (dev != NULL) {
/* Enable access to port 0x22 */
@@ -591,6 +591,7 @@ static int enable_arbiter_disable(void)
pci_cmd |= 1<<7;
pci_write_config_byte(dev, reg, pci_cmd);
}
+ pci_dev_put(dev);
return 1;
}
return 0;
[-- Attachment #3: Type: text/plain, Size: 168 bytes --]
_______________________________________________
Kernel-janitors mailing list
Kernel-janitors@lists.osdl.org
https://lists.osdl.org/mailman/listinfo/kernel-janitors
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-11-19 23:31 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-19 23:31 [KJ] [PATCH] replace pci_find_device with pci_get_device in trem
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.