drivers/net/ remove pci_find_{device, subsys}
Subsystems (3)
PATCH 9/18 drivers/net/ remove pci_find_{device, subsys}
Remove deprecated pci_find_device and pci_find_subsys
AG
--
May the source be with you
drivers/net/e1000/e1000_main.c +1 -1
@@ -2792,7 +2792,7 @@ e1000_notify_reboot(struct notifier_bloccase SYS_DOWN :case SYS_HALT :case SYS_POWER_OFF : -while ((pdev =pci_find_device (PCI_ANY_ID ,PCI_ANY_ID , pdev))) { +while ((pdev =pci_get_device (PCI_ANY_ID ,PCI_ANY_ID , pdev))) {if (pci_dev_driver (pdev) == &e1000_driver)e1000_suspend (pdev,3 ); }
drivers/net/fc/iph5526.c +1 -1
@@ -3711,7 +3711,7 @@ int iph5526_detect(Scsi_Host_Template *t fc[i] =NULL ;for (i =0 ; clone_list[i].vendor_id !=0 ; i++) -while ((pdev =pci_find_device (clone_list[i].vendor_id, clone_list[i].device_id, pdev))) { +while ((pdev =pci_get_device (clone_list[i].vendor_id, clone_list[i].device_id, pdev))) {unsigned short pci_command;if (pci_enable_device (pdev))continue ;
drivers/net/gt96100eth.c +2 -2
@@ -615,9 +615,9 @@ static int gt96100_init_module(void)/* * Stupid probe because this really isn't a PCI device */ -if (!(pci =pci_find_device (PCI_VENDOR_ID_MARVELL , +if (!(pci =pci_get_device (PCI_VENDOR_ID_MARVELL ,PCI_DEVICE_ID_MARVELL_GT96100 ,NULL )) && - !(pci =pci_find_device (PCI_VENDOR_ID_MARVELL , + !(pci =pci_get_device (PCI_VENDOR_ID_MARVELL ,PCI_DEVICE_ID_MARVELL_GT96100A ,NULL ))) { printk(KERN_ERR __FILE__ ": GT96100 not found!\n");return -ENODEV ;
drivers/net/ixgb/ixgb_main.c +1 -1
@@ -2087,7 +2087,7 @@ ixgb_notify_reboot(struct notifier_blockcase SYS_DOWN :case SYS_HALT :case SYS_POWER_OFF : -while ((pdev =pci_find_device (PCI_ANY_ID ,PCI_ANY_ID , pdev))) { +while ((pdev =pci_get_device (PCI_ANY_ID ,PCI_ANY_ID , pdev))) {if (pci_dev_driver (pdev) == &ixgb_driver)ixgb_suspend (pdev,3 ); }
drivers/net/skfp/drvfbi.c +1 -1
@@ -1362,7 +1362,7 @@ int exist_board(struct s_smc *smc, int s ven_id =OEMID (smc,0 ) + (OEMID (smc,1 ) <<8 ) ; dev_id =OEMID (smc,2 ) + (OEMID (smc,3 ) <<8 ) ;for (i =0 ; i < slot; i++) { -if (pci_find_device (i,&smc->hw.pci_handle, +if (pci_get_device (i,&smc->hw.pci_handle, dev_id,ven_id) !=0 ) { found = FALSE ;
drivers/net/sunhme.c +1 -1
@@ -3312,7 +3312,7 @@ static int __init happy_meal_pci_probe(vstruct pci_dev *pdev =NULL ;int cards =0 ; -while ((pdev =pci_find_device (PCI_VENDOR_ID_SUN , +while ((pdev =pci_get_device (PCI_VENDOR_ID_SUN ,PCI_DEVICE_ID_SUN_HAPPYMEAL , pdev)) !=NULL ) {if (pci_enable_device (pdev))continue ;
drivers/net/tg3.c +5 -5
@@ -7825,15 +7825,15 @@ static int __devinit tg3_get_invariants(* every mailbox register write to force the writes to be * posted to the chip in order. */ -if (pci_find_device (PCI_VENDOR_ID_INTEL , +if (pci_get_device (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_82801AA_8 ,NULL ) || -pci_find_device (PCI_VENDOR_ID_INTEL , +pci_get_device (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_82801AB_8 ,NULL ) || -pci_find_device (PCI_VENDOR_ID_INTEL , +pci_get_device (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_82801BA_11 ,NULL ) || -pci_find_device (PCI_VENDOR_ID_INTEL , +pci_get_device (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_82801BA_6 ,NULL ) || -pci_find_device (PCI_VENDOR_ID_AMD , +pci_get_device (PCI_VENDOR_ID_AMD ,PCI_DEVICE_ID_AMD_FE_GATE_700C ,NULL )) tp->tg3_flags |=TG3_FLAG_MBOX_WRITE_REORDER ;
drivers/net/wan/sdladrv.c +2 -2
@@ -2032,7 +2032,7 @@ static int find_s514_adapter(sdlahw_t* h slot_no = hw->S514_slot_no; -while ((pci_dev =pci_find_device (V3_VENDOR_ID ,V3_DEVICE_ID , pci_dev)) +while ((pci_dev =pci_get_device (V3_VENDOR_ID ,V3_DEVICE_ID , pci_dev)) !=NULL ) { pci_read_config_word(pci_dev, PCI_SUBSYS_VENDOR_WORD,
@@ -2245,7 +2245,7 @@ static int pci_probe(sdlahw_t *hw) slot_no =0 ; -while ((pci_dev =pci_find_device (V3_VENDOR_ID ,V3_DEVICE_ID , pci_dev)) +while ((pci_dev =pci_get_device (V3_VENDOR_ID ,V3_DEVICE_ID , pci_dev)) !=NULL ) { pci_read_config_word(pci_dev, PCI_SUBSYS_VENDOR_WORD,
Quoted 5 lines · Amit Gud
diff -uprN
orig/drivers/net/gt96100eth.clinux-2.6.11-rc3/drivers/net/gt96100eth.cdrivers/net/gt96100eth.c +0
-0@@ -615,9 +615,9 @@ static int gt96100_init_module(void)/*
drivers/net/gt96100eth.c static int gt96100_init_module(void) · line 623
Quoted 10 lines
drivers/net/gt96100eth.c +2
-2* Stupid probe because this really isn't a PCI device */ -if (!(pci =pci_find_device (PCI_VENDOR_ID_MARVELL , +if (!(pci =pci_get_device (PCI_VENDOR_ID_MARVELL ,PCI_DEVICE_ID_MARVELL_GT96100 ,NULL )) && - !(pci =pci_find_device (PCI_VENDOR_ID_MARVELL , + !(pci =pci_get_device (PCI_VENDOR_ID_MARVELL ,PCI_DEVICE_ID_MARVELL_GT96100A ,NULL ))) { printk(KERN_ERR __FILE__ ": GT96100 not found!\n");return -ENODEV ;
This (and many other parts of this patch) are incorrect. Please do not apply.
thanks,
greg k-h
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors
drivers/net/e1000/e1000_main.c e1000_notify_reboot(struct notifier_bloc · line 2797
Quoted 12 lines
diff -uprN
orig/drivers/net/e1000/e1000_main.clinux-2.6.11-rc3/drivers/net/e1000/e1000_main.cdrivers/net/e1000/e1000_main.c +1
-1@@ -2792,7 +2792,7 @@ e1000_notify_reboot(struct notifier_bloccase SYS_DOWN :case SYS_HALT :case SYS_POWER_OFF : -while ((pdev =pci_find_device (PCI_ANY_ID ,PCI_ANY_ID , pdev))) { +while ((pdev =pci_get_device (PCI_ANY_ID ,PCI_ANY_ID , pdev))) {if (pci_dev_driver (pdev) == &e1000_driver)e1000_suspend (pdev,3 );
Wrong. The driver should implement ->shutdown instead.
drivers/net/fc/iph5526.c int iph5526_detect(Scsi_Host_Template *t · line 3717
Quoted 12 lines
diff -uprN
orig/drivers/net/fc/iph5526.clinux-2.6.11-rc3/drivers/net/fc/iph5526.cdrivers/net/fc/iph5526.c +1
-1@@ -3711,7 +3711,7 @@ int iph5526_detect(Scsi_Host_Template *t fc[i] =NULL ;for (i =0 ; clone_list[i].vendor_id !=0 ; i++) -while ((pdev =pci_find_device (clone_list[i].vendor_id, clone_list[i].device_id, pdev))) { +while ((pdev =pci_get_device (clone_list[i].vendor_id, clone_list[i].device_id, pdev))) {unsigned short pci_command;if (pci_enable_device (pdev))continue ;
this driver will go away soon.
Quoted 5 lines
diff -uprN
orig/drivers/net/gt96100eth.clinux-2.6.11-rc3/drivers/net/gt96100eth.cdrivers/net/gt96100eth.c +0
-0@@ -615,9 +615,9 @@ static int gt96100_init_module(void)/*
drivers/net/gt96100eth.c static int gt96100_init_module(void) · line 623
Quoted 10 lines
drivers/net/gt96100eth.c +2
-2* Stupid probe because this really isn't a PCI device */ -if (!(pci =pci_find_device (PCI_VENDOR_ID_MARVELL , +if (!(pci =pci_get_device (PCI_VENDOR_ID_MARVELL ,PCI_DEVICE_ID_MARVELL_GT96100 ,NULL )) && - !(pci =pci_find_device (PCI_VENDOR_ID_MARVELL , + !(pci =pci_get_device (PCI_VENDOR_ID_MARVELL ,PCI_DEVICE_ID_MARVELL_GT96100A ,NULL ))) { printk(KERN_ERR __FILE__ ": GT96100 not found!\n");return -ENODEV ;
should use pci_dev_present
drivers/net/ixgb/ixgb_main.c ixgb_notify_reboot(struct notifier_block · line 2093
Quoted 12 lines
diff -uprN
orig/drivers/net/ixgb/ixgb_main.clinux-2.6.11-rc3/drivers/net/ixgb/ixgb_main.cdrivers/net/ixgb/ixgb_main.c +1
-1@@ -2087,7 +2087,7 @@ ixgb_notify_reboot(struct notifier_blockcase SYS_DOWN :case SYS_HALT :case SYS_POWER_OFF : -while ((pdev =pci_find_device (PCI_ANY_ID ,PCI_ANY_ID , pdev))) { +while ((pdev =pci_get_device (PCI_ANY_ID ,PCI_ANY_ID , pdev))) {if (pci_dev_driver (pdev) == &ixgb_driver)ixgb_suspend (pdev,3 ); }
should implement ->shutdown
drivers/net/sunhme.c static int __init happy_meal_pci_probe(v · line 3318
Quoted 12 lines
diff -uprN
orig/drivers/net/sunhme.clinux-2.6.11-rc3/drivers/net/sunhme.cdrivers/net/sunhme.c +1
-1@@ -3312,7 +3312,7 @@ static int __init happy_meal_pci_probe(vstruct pci_dev *pdev =NULL ;int cards =0 ; -while ((pdev =pci_find_device (PCI_VENDOR_ID_SUN , +while ((pdev =pci_get_device (PCI_VENDOR_ID_SUN ,PCI_DEVICE_ID_SUN_HAPPYMEAL , pdev)) !=NULL ) {if (pci_enable_device (pdev))continue ;
should switch to proper hotplug-style probing.
Quoted 13 lines
diff -uprN
orig/drivers/net/tg3.clinux-2.6.11-rc3/drivers/net/tg3.cdrivers/net/tg3.c +2
-2@@ -7825,15 +7825,15 @@ static int __devinit tg3_get_invariants(* every mailbox register write to force the writes to be * posted to the chip in order. */ - if (pci_find_device(PCI_VENDOR_ID_INTEL, + if (pci_get_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AA_8, NULL) || - pci_find_device(PCI_VENDOR_ID_INTEL, + pci_get_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801AB_8, NULL) ||
drivers/net/tg3.c static int __devinit tg3_get_invariants( · line 7838
Quoted 10 lines
drivers/net/tg3.c +3
-3-pci_find_device (PCI_VENDOR_ID_INTEL , +pci_get_device (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_82801BA_11 ,NULL ) || -pci_find_device (PCI_VENDOR_ID_INTEL , +pci_get_device (PCI_VENDOR_ID_INTEL ,PCI_DEVICE_ID_INTEL_82801BA_6 ,NULL ) || -pci_find_device (PCI_VENDOR_ID_AMD , +pci_get_device (PCI_VENDOR_ID_AMD , PCI_DEVICE_ID_AMD_FE_GATE_700C, NULL)) tp->tg3_flags |= TG3_FLAG_MBOX_WRITE_REORDER;
should use pci_dev_present.
Quoted 14 lines
diff -uprN
orig/drivers/net/wan/sdladrv.clinux-2.6.11-rc3/drivers/net/wan/sdladrv.cdrivers/net/wan/sdladrv.c +1
-1@@ -2032,7 +2032,7 @@ static int find_s514_adapter(sdlahw_t* h slot_no = hw->S514_slot_no; -while ((pci_dev =pci_find_device (V3_VENDOR_ID ,V3_DEVICE_ID , pci_dev)) +while ((pci_dev =pci_get_device (V3_VENDOR_ID ,V3_DEVICE_ID , pci_dev)) !=NULL ) { pci_read_config_word(pci_dev, PCI_SUBSYS_VENDOR_WORD,
drivers/net/wan/sdladrv.c static int pci_probe(sdlahw_t *hw) · line 2251
Quoted 8 lines
drivers/net/wan/sdladrv.c +1
-1@@ -2245,7 +2245,7 @@ static int pci_probe(sdlahw_t *hw) slot_no =0 ; -while ((pci_dev =pci_find_device (V3_VENDOR_ID ,V3_DEVICE_ID , pci_dev)) +while ((pci_dev =pci_get_device (V3_VENDOR_ID ,V3_DEVICE_ID , pci_dev)) !=NULL ) { pci_read_config_word(pci_dev, PCI_SUBSYS_VENDOR_WORD,
should use proper hotplug-style probing
_______________________________________________
Kernel-janitors mailing list
[email protected]
http://lists.osdl.org/mailman/listinfo/kernel-janitors