Skip to contentSkip to conversation

drivers/macintosh/ remove pci_find_{device,

PATCH In review Amit Gud 2 participants 2 messages Feb 14, 2005

Subsystems (2)
lore
Share & tools
lore

Amit Gud

author
#0 lore raw

PATCH 6/18 drivers/macintosh/ remove pci_find_{device,

Remove deprecated pci_find_device and pci_find_subsys

AG
--
May the source be with you

drivers/macintosh/via-pmu68k.c +3 -3
diff -uprN orig/drivers/macintosh/via-pmu68k.c linux-2.6.11-rc3/drivers/macintosh/via-pmu68k.c
@@ -843,7 +843,7 @@ pbook_pci_save(void)
 	struct pci_save *ps;
 
 	npci = 0;
-	while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL)
+	while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL)
 		++npci;
 	n_pbook_pci_saves = npci;
 	if (npci == 0)
@@ -854,7 +854,7 @@ pbook_pci_save(void)
 		return;
 
 	pd = NULL;
-	while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
+	while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
 		pci_read_config_word(pd, PCI_COMMAND, &ps->command);
 		pci_read_config_word(pd, PCI_CACHE_LINE_SIZE, &ps->cache_lat);
 		pci_read_config_word(pd, PCI_INTERRUPT_LINE, &ps->intr);
@@ -871,7 +871,7 @@ pbook_pci_restore(void)
 	struct pci_dev *pd = NULL;
 	int j;
 
-	while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
+	while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
 		if (ps->command == 0)
 			continue;
 		pci_read_config_word(pd, PCI_COMMAND, &cmd);
drivers/macintosh/via-pmu.c +3 -3
diff -uprN orig/drivers/macintosh/via-pmu.c linux-2.6.11-rc3/drivers/macintosh/via-pmu.c
@@ -2141,7 +2141,7 @@ pbook_alloc_pci_save(void)
 	struct pci_dev *pd = NULL;
 
 	npci = 0;
-	while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
+	while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
 		++npci;
 	}
 	if (npci == 0)
@@ -2171,7 +2171,7 @@ pbook_pci_save(void)
 	if (ps == NULL)
 		return;
 
-	while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
+	while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
 		if (npci-- == 0)
 			return;
 #ifndef HACKED_PCI_SAVE
@@ -2201,7 +2201,7 @@ pbook_pci_restore(void)
 	int npci = pbook_npci_saves;
 	int j;
 
-	while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
+	while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL) {
 #ifdef HACKED_PCI_SAVE
 		int i;
 		if (npci-- == 0)

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors

#1 lore raw
Quoted 14 lines · Amit Gud

Remove deprecated pci_find_device and pci_find_subsys

AG
--
May the source be with you

diff -uprN orig/drivers/macintosh/via-pmu68k.c linux-2.6.11-rc3/drivers/macintosh/via-pmu68k.c

drivers/macintosh/via-pmu68k.c pbook_pci_save(void) · line 849

Quoted 8 lines
drivers/macintosh/via-pmu68k.c +1 -1
@@ -843,7 +843,7 @@ pbook_pci_save(void)
 	struct pci_save *ps;
 
 	npci = 0;
-	while ((pd = pci_find_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL)
+	while ((pd = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, pd)) != NULL)
 		++npci;
 	n_pbook_pci_saves = npci;
 	if (npci == 0)

No, this is not correct. Please do not apply.

thanks,

greg k-h

_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors