bk://kernel.bkbits.net/gregkh/linux/pci-2.6 greg@kroah.com|ChangeSet|20040826222759|15607 greg # This is a BitKeeper generated diff -Nru style patch. # # ChangeSet # 2004/08/28 16:19:47-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/08/28 16:19:42-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/pci/pci.ids # 2004/08/28 16:19:42-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/27 15:15:17-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/08/27 15:15:14-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/27 13:57:31-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/08/27 13:57:28-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/26 15:27:59-07:00 greg@kroah.com # PCI: delete the pci_find_class() function as it's unsafe in hotpluggable systems. # # Signed-off-by: Greg Kroah-Hartman # # include/linux/pci.h # 2004/08/26 15:26:34-07:00 greg@kroah.com +0 -4 # PCI: delete the pci_find_class() function as it's unsafe in hotpluggable systems. # # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/search.c # 2004/08/26 15:26:34-07:00 greg@kroah.com +0 -40 # PCI: delete the pci_find_class() function as it's unsafe in hotpluggable systems. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/26 15:26:14-07:00 greg@kroah.com # PCI: remove pci_find_class() usage from all drivers/ files # # Signed-off-by: Greg Kroah-Hartman # # drivers/scsi/eata.c # 2004/08/26 15:23:42-07:00 greg@kroah.com +9 -3 # PCI: remove pci_find_class() usage from all drivers/ files # # Signed-off-by: Greg Kroah-Hartman # # drivers/net/wan/sbni.c # 2004/08/26 15:23:43-07:00 greg@kroah.com +5 -1 # PCI: remove pci_find_class() usage from all drivers/ files # # Signed-off-by: Greg Kroah-Hartman # # drivers/media/video/bttv-cards.c # 2004/08/26 15:23:43-07:00 greg@kroah.com +3 -3 # PCI: remove pci_find_class() usage from all drivers/ files # # Signed-off-by: Greg Kroah-Hartman # # drivers/char/ipmi/ipmi_si_intf.c # 2004/08/26 15:23:43-07:00 greg@kroah.com +10 -4 # PCI: remove pci_find_class() usage from all drivers/ files # # Signed-off-by: Greg Kroah-Hartman # # drivers/char/drm/drm_fops.h # 2004/08/26 15:23:43-07:00 greg@kroah.com +5 -2 # PCI: remove pci_find_class() usage from all drivers/ files # # Signed-off-by: Greg Kroah-Hartman # # drivers/char/applicom.c # 2004/08/26 15:23:43-07:00 greg@kroah.com +1 -1 # PCI: remove pci_find_class() usage from all drivers/ files # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/26 15:21:14-07:00 greg@kroah.com # PCI: remove pci_find_class() usage from arch specific files. # # Signed-off-by: Greg Kroah-Hartman # # arch/ppc64/kernel/pci.c # 2004/08/26 15:18:07-07:00 greg@kroah.com +1 -1 # PCI: remove pci_find_class() usage from arch specific files. # # Signed-off-by: Greg Kroah-Hartman # # arch/i386/kernel/cpu/mtrr/main.c # 2004/08/26 15:18:07-07:00 greg@kroah.com +5 -3 # PCI: remove pci_find_class() usage from arch specific files. # # Signed-off-by: Greg Kroah-Hartman # # arch/alpha/kernel/console.c # 2004/08/26 15:18:07-07:00 greg@kroah.com +1 -1 # PCI: remove pci_find_class() usage from arch specific files. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/26 14:12:40-07:00 greg@kroah.com # PCI: clean up the comments in search.c to be correct. # # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/search.c # 2004/08/26 14:11:30-07:00 greg@kroah.com +8 -10 # PCI: clean up the comments in search.c to be correct. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/26 14:09:38-07:00 greg@kroah.com # PCI: add pci_get_class() to make a safe pci_find_class() like call. # # Signed-off-by: Greg Kroah-Hartman # # include/linux/pci.h # 2004/08/26 14:08:25-07:00 greg@kroah.com +4 -0 # PCI: add pci_get_class() to make a safe pci_find_class() like call. # # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/search.c # 2004/08/26 14:08:26-07:00 greg@kroah.com +38 -0 # PCI: add pci_get_class() to make a safe pci_find_class() like call. # # Signed-off-by: Greg Kroah-Hartman # # Documentation/pci.txt # 2004/08/26 14:08:25-07:00 greg@kroah.com +3 -2 # PCI: add pci_get_class() to make a safe pci_find_class() like call. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/26 14:06:36-07:00 greg@kroah.com # PCI: make pci_find_class() warn if in interrupt like all other find/get functions do. # # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/search.c # 2004/08/26 14:04:59-07:00 greg@kroah.com +1 -0 # PCI: make pci_find_class() warn if in interrupt like all other find/get functions do. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/26 11:14:09-07:00 greg@kroah.com # PCI: update the pci.txt documentation about pci_find_device and pci_find_subsys going away # # Signed-off-by: Greg Kroah-Hartman # # Documentation/pci.txt # 2004/08/26 11:13:38-07:00 greg@kroah.com +4 -4 # PCI: update the pci.txt documentation about pci_find_device and pci_find_subsys going away # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/26 11:10:23-07:00 greg@kroah.com # PCI: make pci_find_subsys() static, as it should not be used anymore # # Use pci_get_subsys() if you want this functionality. # # Signed-off-by: Greg Kroah-Hartman # # include/linux/pci.h # 2004/08/26 11:09:53-07:00 greg@kroah.com +0 -7 # PCI: make pci_find_subsys() static, as it should not be used anymore # # Use pci_get_subsys() if you want this functionality. # # Signed-off-by: Greg Kroah-Hartman # # drivers/pci/search.c # 2004/08/26 11:09:53-07:00 greg@kroah.com +5 -5 # PCI: make pci_find_subsys() static, as it should not be used anymore # # Use pci_get_subsys() if you want this functionality. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/26 11:09:24-07:00 greg@kroah.com # PCI: remove pci_find_subsys() calls from acpi code. # # Signed-off-by: Greg Kroah-Hartman # # drivers/acpi/processor.c # 2004/08/26 11:08:27-07:00 greg@kroah.com +10 -5 # PCI: remove pci_find_subsys() calls from acpi code. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/26 11:04:58-07:00 greg@kroah.com # PCI: remove pci_find_subsys() calls from cpufreq code. # # Signed-off-by: Greg Kroah-Hartman # # arch/i386/kernel/cpu/cpufreq/speedstep-ich.c # 2004/08/26 11:01:25-07:00 greg@kroah.com +10 -5 # PCI: remove pci_find_subsys() calls from cpufreq code. # # Signed-off-by: Greg Kroah-Hartman # # ChangeSet # 2004/08/24 17:36:23-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # drivers/parisc/superio.c # 2004/08/24 17:36:18-07:00 akpm@bix.(none) +0 -0 # Auto merged # # arch/ppc64/kernel/pSeries_pci.c # 2004/08/24 17:36:18-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/23 16:44:54-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # kernel/params.c # 2004/08/23 16:44:47-07:00 akpm@bix.(none) +0 -0 # Auto merged # # include/linux/pci_ids.h # 2004/08/23 16:44:47-07:00 akpm@bix.(none) +0 -0 # Auto merged # # include/linux/moduleparam.h # 2004/08/23 16:44:47-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/ide/pci/hpt366.c # 2004/08/23 16:44:47-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/23 14:36:00-07:00 akpm@bix.(none) # Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.6 # into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/08/23 14:35:56-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/pci/quirks.c # 2004/08/23 14:35:56-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/parisc/superio.c # 2004/08/23 14:35:56-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/ide/pci/hpt366.c # 2004/08/23 14:35:56-07:00 akpm@bix.(none) +0 -0 # Auto merged # # arch/ppc64/kernel/pSeries_pci.c # 2004/08/23 14:35:56-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/23 14:33:35-07:00 akpm@bix.(none) # Merge # # kernel/params.c # 2004/08/23 14:33:31-07:00 akpm@bix.(none) +0 -0 # SCCS merged # # include/linux/pci_ids.h # 2004/08/23 14:32:23-07:00 akpm@bix.(none) +0 -0 # Auto merged # # include/linux/moduleparam.h # 2004/08/23 14:32:23-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/22 21:34:38-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/08/22 21:34:35-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/pci/quirks.c # 2004/08/22 21:34:35-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/ide/pci/hpt366.c # 2004/08/22 21:34:34-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/15 01:20:07-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # drivers/parisc/superio.c # 2004/08/15 01:20:04-07:00 akpm@bix.(none) +0 -0 # Auto merged # # arch/i386/kernel/dmi_scan.c # 2004/08/15 01:20:04-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/07 19:08:19-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # arch/ppc64/kernel/pSeries_pci.c # 2004/08/07 19:08:15-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/04 17:55:19-07:00 akpm@bix.(none) # Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.6 # into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/08/04 17:55:15-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/04 02:57:45-07:00 akpm@bix.(none) # Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.6 # into bix.(none):/usr/src/bk-pci # # drivers/pci/pci.ids # 2004/08/04 02:57:42-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/02 13:30:07-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # arch/i386/pci/irq.c # 2004/08/02 13:30:03-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/08/01 00:12:39-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/08/01 00:12:36-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/07/30 22:35:06-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/07/30 22:35:02-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/07/16 18:41:52-07:00 akpm@bix.(none) # Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.6 # into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/07/16 18:41:48-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/pci/pci.ids # 2004/07/16 18:41:48-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/07/16 18:40:58-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/07/16 18:40:54-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/07/11 13:41:14-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # arch/i386/kernel/dmi_scan.c # 2004/07/11 13:41:11-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/07/05 13:06:46-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # arch/i386/kernel/dmi_scan.c # 2004/07/05 13:06:42-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/07/02 15:26:07-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/07/02 15:26:03-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/pci/pci.ids # 2004/07/02 15:26:03-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/07/01 01:43:28-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/07/01 01:43:24-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/06/28 00:32:35-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # arch/i386/pci/irq.c # 2004/06/28 00:32:31-07:00 akpm@bix.(none) +0 -0 # Auto merged # # arch/i386/kernel/dmi_scan.c # 2004/06/28 00:32:31-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/06/24 18:25:30-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/06/24 18:25:26-07:00 akpm@bix.(none) +0 -0 # Auto merged # # arch/i386/pci/irq.c # 2004/06/24 18:25:26-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/06/24 12:53:53-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/06/24 12:53:49-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/06/23 20:35:25-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # arch/i386/pci/irq.c # 2004/06/23 20:35:21-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/06/23 02:01:10-07:00 akpm@bix.(none) # Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.6 # into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/06/23 02:01:06-07:00 akpm@bix.(none) +0 -0 # Auto merged # # arch/i386/pci/irq.c # 2004/06/23 02:01:06-07:00 akpm@bix.(none) +0 -0 # Auto merged # # arch/i386/kernel/dmi_scan.c # 2004/06/23 02:01:06-07:00 akpm@bix.(none) +0 -7 # Auto merged # # ChangeSet # 2004/06/20 23:49:50-07:00 akpm@bix.(none) # Merge # # arch/i386/pci/irq.c # 2004/06/20 23:49:47-07:00 akpm@bix.(none) +0 -0 # SCCS merged # # arch/i386/kernel/dmi_scan.c # 2004/06/20 23:49:26-07:00 akpm@bix.(none) +7 -0 # SCCS merged # # ChangeSet # 2004/06/18 12:23:56-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/06/18 12:23:53-07:00 akpm@bix.(none) +0 -0 # Auto merged # # arch/i386/kernel/dmi_scan.c # 2004/06/18 12:23:53-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/06/15 21:56:51-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/06/15 21:56:48-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/pci/pci.ids # 2004/06/15 21:56:48-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/06/08 21:55:31-07:00 akpm@bix.(none) # Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.6 # into bix.(none):/usr/src/bk-pci # # arch/i386/kernel/dmi_scan.c # 2004/06/08 21:55:27-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/06/03 10:37:43-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/06/03 10:37:40-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/06/02 13:31:47-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/06/02 13:31:44-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/05/28 14:10:25-07:00 akpm@bix.(none) # Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.6 # into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/05/28 14:10:22-07:00 akpm@bix.(none) +0 -0 # Auto merged # # drivers/pci/pci.ids # 2004/05/28 14:10:22-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/05/28 14:09:37-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/05/28 14:09:34-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/05/24 11:42:00-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/05/24 11:41:57-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/05/22 23:42:26-07:00 akpm@bix.(none) # Merge bix.(none):/usr/src/bk25 into bix.(none):/usr/src/bk-pci # # include/linux/pci_ids.h # 2004/05/22 23:42:23-07:00 akpm@bix.(none) +0 -0 # Auto merged # # ChangeSet # 2004/05/19 14:16:27-07:00 akpm@bix.(none) # Merge bk://kernel.bkbits.net/gregkh/linux/pci-2.6 # into bix.(none):/usr/src/bk-pci # # drivers/pci/pci.ids # 2004/05/19 14:16:24-07:00 akpm@bix.(none) +0 -0 # Auto merged # diff -Nru a/Documentation/pci.txt b/Documentation/pci.txt --- a/Documentation/pci.txt 2004-08-30 17:46:36 -07:00 +++ b/Documentation/pci.txt 2004-08-30 17:46:36 -07:00 @@ -141,16 +141,16 @@ Searching by vendor and device ID: struct pci_dev *dev = NULL; - while (dev = pci_find_device(VENDOR_ID, DEVICE_ID, dev)) + while (dev = pci_get_device(VENDOR_ID, DEVICE_ID, dev)) configure_device(dev); Searching by class ID (iterate in a similar way): - pci_find_class(CLASS_ID, dev) + pci_get_class(CLASS_ID, dev) Searching by both vendor/device and subsystem vendor/device ID: - pci_find_subsys(VENDOR_ID, DEVICE_ID, SUBSYS_VENDOR_ID, SUBSYS_DEVICE_ID, dev). + pci_get_subsys(VENDOR_ID, DEVICE_ID, SUBSYS_VENDOR_ID, SUBSYS_DEVICE_ID, dev). You can use the constant PCI_ANY_ID as a wildcard replacement for VENDOR_ID or DEVICE_ID. This allows searching for any device from a @@ -275,11 +275,12 @@ devices just return NULL. pcibios_(read|write)_* Superseded by their pci_(read|write)_* counterparts. -pcibios_find_* Superseded by their pci_find_* counterparts. -pci_for_each_dev() Superseded by pci_find_device() +pcibios_find_* Superseded by their pci_get_* counterparts. +pci_for_each_dev() Superseded by pci_get_device() pci_for_each_dev_reverse() Superseded by pci_find_device_reverse() pci_for_each_bus() Superseded by pci_find_next_bus() pci_find_device() Superseded by pci_get_device() pci_find_subsys() Superseded by pci_get_subsys() -pcibios_find_class() Superseded by pci_find_class() +pcibios_find_class() Superseded by pci_get_class() +pci_find_class() Superseded by pci_get_class() pci_(read|write)_*_nodev() Superseded by pci_bus_(read|write)_*() diff -Nru a/arch/alpha/kernel/console.c b/arch/alpha/kernel/console.c --- a/arch/alpha/kernel/console.c 2004-08-30 17:46:36 -07:00 +++ b/arch/alpha/kernel/console.c 2004-08-30 17:46:36 -07:00 @@ -47,7 +47,7 @@ if (!sel_func) sel_func = (void *)default_vga_hose_select; - for(dev=NULL; (dev=pci_find_class(PCI_CLASS_DISPLAY_VGA << 8, dev));) { + for(dev=NULL; (dev=pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, dev));) { if (!hose) hose = dev->sysdata; else hose = sel_func(hose, dev->sysdata); } diff -Nru a/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c b/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c --- a/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c 2004-08-30 17:46:36 -07:00 +++ b/arch/i386/kernel/cpu/cpufreq/speedstep-ich.c 2004-08-30 17:46:36 -07:00 @@ -171,7 +171,7 @@ */ static unsigned int speedstep_detect_chipset (void) { - speedstep_chipset_dev = pci_find_subsys(PCI_VENDOR_ID_INTEL, + speedstep_chipset_dev = pci_get_subsys(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801DB_12, PCI_ANY_ID, PCI_ANY_ID, @@ -179,7 +179,7 @@ if (speedstep_chipset_dev) return 4; /* 4-M */ - speedstep_chipset_dev = pci_find_subsys(PCI_VENDOR_ID_INTEL, + speedstep_chipset_dev = pci_get_subsys(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801CA_12, PCI_ANY_ID, PCI_ANY_ID, @@ -188,7 +188,7 @@ return 3; /* 3-M */ - speedstep_chipset_dev = pci_find_subsys(PCI_VENDOR_ID_INTEL, + speedstep_chipset_dev = pci_get_subsys(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82801BA_10, PCI_ANY_ID, PCI_ANY_ID, @@ -201,7 +201,7 @@ static struct pci_dev *hostbridge; u8 rev = 0; - hostbridge = pci_find_subsys(PCI_VENDOR_ID_INTEL, + hostbridge = pci_get_subsys(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82815_MC, PCI_ANY_ID, PCI_ANY_ID, @@ -214,9 +214,11 @@ if (rev < 5) { dprintk(KERN_INFO "cpufreq: hostbridge does not support speedstep\n"); speedstep_chipset_dev = NULL; + pci_dev_put(hostbridge); return 0; } + pci_dev_put(hostbridge); return 2; /* 2-M */ } @@ -411,8 +413,10 @@ } /* activate speedstep support */ - if (speedstep_activate()) + if (speedstep_activate()) { + pci_dev_put(speedstep_chipset_dev); return -EINVAL; + } return cpufreq_register_driver(&speedstep_driver); } @@ -425,6 +429,7 @@ */ static void __exit speedstep_exit(void) { + pci_dev_put(speedstep_chipset_dev); cpufreq_unregister_driver(&speedstep_driver); } diff -Nru a/arch/i386/kernel/cpu/mtrr/main.c b/arch/i386/kernel/cpu/mtrr/main.c --- a/arch/i386/kernel/cpu/mtrr/main.c 2004-08-30 17:46:36 -07:00 +++ b/arch/i386/kernel/cpu/mtrr/main.c 2004-08-30 17:46:36 -07:00 @@ -77,22 +77,24 @@ { struct pci_dev *dev; - if ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8, NULL)) != NULL) { + if ((dev = pci_get_class(PCI_CLASS_BRIDGE_HOST << 8, NULL)) != NULL) { /* ServerWorks LE chipsets have problems with write-combining Don't allow it and leave room for other chipsets to be tagged */ if (dev->vendor == PCI_VENDOR_ID_SERVERWORKS && dev->device == PCI_DEVICE_ID_SERVERWORKS_LE) { printk(KERN_INFO "mtrr: Serverworks LE detected. Write-combining disabled.\n"); + pci_dev_put(dev); return 0; } /* Intel 450NX errata # 23. Non ascending cachline evictions to write combining memory may resulting in data corruption */ if (dev->vendor == PCI_VENDOR_ID_INTEL && - dev->device == PCI_DEVICE_ID_INTEL_82451NX) - { + dev->device == PCI_DEVICE_ID_INTEL_82451NX) { printk(KERN_INFO "mtrr: Intel 450NX MMC detected. Write-combining disabled.\n"); + pci_dev_put(dev); return 0; } + pci_dev_put(dev); } return (mtrr_if->have_wrcomb ? mtrr_if->have_wrcomb() : 0); } diff -Nru a/arch/ppc64/kernel/pci.c b/arch/ppc64/kernel/pci.c --- a/arch/ppc64/kernel/pci.c 2004-08-30 17:46:36 -07:00 +++ b/arch/ppc64/kernel/pci.c 2004-08-30 17:46:36 -07:00 @@ -297,7 +297,7 @@ ppc_md.pcibios_fixup(); /* Cache the location of the ISA bridge (if we have one) */ - ppc64_isabridge_dev = pci_find_class(PCI_CLASS_BRIDGE_ISA << 8, NULL); + ppc64_isabridge_dev = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL); if (ppc64_isabridge_dev != NULL) printk("ISA bridge at %s\n", pci_name(ppc64_isabridge_dev)); diff -Nru a/drivers/acpi/processor.c b/drivers/acpi/processor.c --- a/drivers/acpi/processor.c 2004-08-30 17:46:36 -07:00 +++ b/drivers/acpi/processor.c 2004-08-30 17:46:36 -07:00 @@ -213,11 +213,13 @@ * each IDE controller's DMA status to make sure we catch all * DMA activity. */ - dev = pci_find_subsys(PCI_VENDOR_ID_INTEL, + dev = pci_get_subsys(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB, PCI_ANY_ID, PCI_ANY_ID, NULL); - if (dev) + if (dev) { errata.piix4.bmisx = pci_resource_start(dev, 4); + pci_dev_put(dev); + } /* * Type-F DMA @@ -228,7 +230,7 @@ * disable C3 support if this is enabled, as some legacy * devices won't operate well if fast DMA is disabled. */ - dev = pci_find_subsys(PCI_VENDOR_ID_INTEL, + dev = pci_get_subsys(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_0, PCI_ANY_ID, PCI_ANY_ID, NULL); if (dev) { @@ -236,6 +238,7 @@ pci_read_config_byte(dev, 0x77, &value2); if ((value1 & 0x80) || (value2 & 0x80)) errata.piix4.fdma = 1; + pci_dev_put(dev); } break; @@ -267,10 +270,12 @@ /* * PIIX4 */ - dev = pci_find_subsys(PCI_VENDOR_ID_INTEL, + dev = pci_get_subsys(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371AB_3, PCI_ANY_ID, PCI_ANY_ID, NULL); - if (dev) + if (dev) { result = acpi_processor_errata_piix4(dev); + pci_dev_put(dev); + } return_VALUE(result); } diff -Nru a/drivers/char/applicom.c b/drivers/char/applicom.c --- a/drivers/char/applicom.c 2004-08-30 17:46:36 -07:00 +++ b/drivers/char/applicom.c 2004-08-30 17:46:36 -07:00 @@ -200,7 +200,7 @@ /* No mem and irq given - check for a PCI card */ - while ( (dev = pci_find_class(PCI_CLASS_OTHERS << 16, dev))) { + while ( (dev = pci_get_class(PCI_CLASS_OTHERS << 16, dev))) { if (dev->vendor != PCI_VENDOR_ID_APPLICOM) continue; diff -Nru a/drivers/char/drm/drm_fops.h b/drivers/char/drm/drm_fops.h --- a/drivers/char/drm/drm_fops.h 2004-08-30 17:46:36 -07:00 +++ b/drivers/char/drm/drm_fops.h 2004-08-30 17:46:36 -07:00 @@ -94,8 +94,11 @@ */ if (!dev->hose) { struct pci_dev *pci_dev; - pci_dev = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8, NULL); - if (pci_dev) dev->hose = pci_dev->sysdata; + pci_dev = pci_get_class(PCI_CLASS_DISPLAY_VGA << 8, NULL); + if (pci_dev) { + dev->hose = pci_dev->sysdata; + pci_dev_put(pci_dev); + } if (!dev->hose) { struct pci_bus *b = pci_bus_b(pci_root_buses.next); if (b) dev->hose = b->sysdata; diff -Nru a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c --- a/drivers/char/ipmi/ipmi_si_intf.c 2004-08-30 17:46:36 -07:00 +++ b/drivers/char/ipmi/ipmi_si_intf.c 2004-08-30 17:46:36 -07:00 @@ -1777,10 +1777,10 @@ pci_smic_checked = 1; - if ((pci_dev = pci_find_device(PCI_HP_VENDOR_ID, PCI_MMC_DEVICE_ID, + if ((pci_dev = pci_get_device(PCI_HP_VENDOR_ID, PCI_MMC_DEVICE_ID, NULL))) ; - else if ((pci_dev = pci_find_class(PCI_ERMC_CLASSCODE, NULL)) && + else if ((pci_dev = pci_get_class(PCI_ERMC_CLASSCODE, NULL)) && pci_dev->subsystem_vendor == PCI_HP_VENDOR_ID) fe_rmc = 1; else @@ -1789,6 +1789,7 @@ error = pci_read_config_word(pci_dev, PCI_MMC_ADDR_CW, &base_addr); if (error) { + pci_dev_put(pci_dev); printk(KERN_ERR "ipmi_si: pci_read_config_word() failed (%d).\n", error); @@ -1798,6 +1799,7 @@ /* Bit 0: 1 specifies programmed I/O, 0 specifies memory mapped I/O */ if (!(base_addr & 0x0001)) { + pci_dev_put(pci_dev); printk(KERN_ERR "ipmi_si: memory mapped I/O not supported for PCI" " smic.\n"); @@ -1809,11 +1811,14 @@ /* Data register starts at base address + 1 in eRMC */ ++base_addr; - if (!is_new_interface(-1, IPMI_IO_ADDR_SPACE, base_addr)) - return -ENODEV; + if (!is_new_interface(-1, IPMI_IO_ADDR_SPACE, base_addr)) { + pci_dev_put(pci_dev); + return -ENODEV; + } info = kmalloc(sizeof(*info), GFP_KERNEL); if (!info) { + pci_dev_put(pci_dev); printk(KERN_ERR "ipmi_si: Could not allocate SI data (5)\n"); return -ENOMEM; } @@ -1836,6 +1841,7 @@ printk("ipmi_si: Found PCI SMIC at I/O address 0x%lx\n", (long unsigned int) base_addr); + pci_dev_put(pci_dev); return 0; } #endif /* CONFIG_PCI */ diff -Nru a/drivers/media/video/bttv-cards.c b/drivers/media/video/bttv-cards.c --- a/drivers/media/video/bttv-cards.c 2004-08-30 17:46:36 -07:00 +++ b/drivers/media/video/bttv-cards.c 2004-08-30 17:46:36 -07:00 @@ -3963,7 +3963,7 @@ #if 0 /* print which chipset we have */ - while ((dev = pci_find_class(PCI_CLASS_BRIDGE_HOST << 8,dev))) + while ((dev = pci_get_class(PCI_CLASS_BRIDGE_HOST << 8,dev))) printk(KERN_INFO "bttv: Host bridge is %s\n",pci_name(dev)); #endif @@ -3982,8 +3982,8 @@ if (UNSET != latency) printk(KERN_INFO "bttv: pci latency fixup [%d]\n",latency); - while ((dev = pci_find_device(PCI_VENDOR_ID_INTEL, - PCI_DEVICE_ID_INTEL_82441, dev))) { + while ((dev = pci_get_device(PCI_VENDOR_ID_INTEL, + PCI_DEVICE_ID_INTEL_82441, dev))) { unsigned char b; pci_read_config_byte(dev, 0x53, &b); if (bttv_debug) diff -Nru a/drivers/net/wan/sbni.c b/drivers/net/wan/sbni.c --- a/drivers/net/wan/sbni.c 2004-08-30 17:46:36 -07:00 +++ b/drivers/net/wan/sbni.c 2004-08-30 17:46:36 -07:00 @@ -294,7 +294,7 @@ { struct pci_dev *pdev = NULL; - while( (pdev = pci_find_class( PCI_CLASS_NETWORK_OTHER << 8, pdev )) + while( (pdev = pci_get_class( PCI_CLASS_NETWORK_OTHER << 8, pdev )) != NULL ) { int pci_irq_line; unsigned long pci_ioaddr; @@ -331,10 +331,14 @@ /* avoiding re-enable dual adapters */ if( (pci_ioaddr & 7) == 0 && pci_enable_device( pdev ) ) { release_region( pci_ioaddr, SBNI_IO_EXTENT ); + pci_dev_put( pdev ); return -EIO; } if( sbni_probe1( dev, pci_ioaddr, pci_irq_line ) ) { SET_NETDEV_DEV(dev, &pdev->dev); + /* not the best thing to do, but this is all messed up + for hotplug systems anyway... */ + pci_dev_put( pdev ); return 0; } } diff -Nru a/drivers/pci/search.c b/drivers/pci/search.c --- a/drivers/pci/search.c 2004-08-30 17:46:36 -07:00 +++ b/drivers/pci/search.c 2004-08-30 17:46:36 -07:00 @@ -1,10 +1,10 @@ /* * PCI searching functions. * - * Copyright 1993 -- 1997 Drew Eckhardt, Frederic Potter, - * David Mosberger-Tang - * Copyright 1997 -- 2000 Martin Mares - * Copyright 2003 -- Greg Kroah-Hartman + * Copyright (C) 1993 -- 1997 Drew Eckhardt, Frederic Potter, + * David Mosberger-Tang + * Copyright (C) 1997 -- 2000 Martin Mares + * Copyright (C) 2003 -- 2004 Greg Kroah-Hartman */ #include @@ -156,10 +156,11 @@ * the pci device returned by this function can disappear at any moment in * time. */ -struct pci_dev * -pci_find_subsys(unsigned int vendor, unsigned int device, - unsigned int ss_vendor, unsigned int ss_device, - const struct pci_dev *from) +static struct pci_dev * pci_find_subsys(unsigned int vendor, + unsigned int device, + unsigned int ss_vendor, + unsigned int ss_device, + const struct pci_dev *from) { struct list_head *n; struct pci_dev *dev; @@ -257,12 +258,6 @@ * @from: Previous PCI device found in search, or %NULL for new search. * * Iterates through the list of known PCI devices. If a PCI device is - * found with a matching @vendor and @device, a pointer to its device structure is - * returned. Otherwise, %NULL is returned. - * A new search is initiated by passing %NULL to the @from argument. - * Otherwise if @from is not %NULL, searches continue from next device on the global list. - * - * Iterates through the list of known PCI devices. If a PCI device is * found with a matching @vendor and @device, the reference count to the * device is incremented and a pointer to its device structure is returned. * Otherwise, %NULL is returned. A new search is initiated by passing %NULL @@ -312,25 +307,26 @@ return dev; } - /** - * pci_find_class - begin or continue searching for a PCI device by class + * pci_get_class - begin or continue searching for a PCI device by class * @class: search for a PCI device with this class designation * @from: Previous PCI device found in search, or %NULL for new search. * * Iterates through the list of known PCI devices. If a PCI device is - * found with a matching @class, a pointer to its device structure is - * returned. Otherwise, %NULL is returned. + * found with a matching @class, the reference count to the device is + * incremented and a pointer to its device structure is returned. + * Otherwise, %NULL is returned. * A new search is initiated by passing %NULL to the @from argument. * Otherwise if @from is not %NULL, searches continue from next device - * on the global list. + * on the global list. The reference count for @from is always decremented + * if it is not %NULL. */ -struct pci_dev * -pci_find_class(unsigned int class, const struct pci_dev *from) +struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from) { struct list_head *n; struct pci_dev *dev; + WARN_ON(in_interrupt()); spin_lock(&pci_bus_lock); n = from ? from->global_list.next : pci_devices.next; @@ -342,16 +338,17 @@ } dev = NULL; exit: + pci_dev_put(from); + dev = pci_dev_get(dev); spin_unlock(&pci_bus_lock); return dev; } EXPORT_SYMBOL(pci_find_bus); -EXPORT_SYMBOL(pci_find_class); EXPORT_SYMBOL(pci_find_device); EXPORT_SYMBOL(pci_find_device_reverse); EXPORT_SYMBOL(pci_find_slot); -EXPORT_SYMBOL(pci_find_subsys); EXPORT_SYMBOL(pci_get_device); EXPORT_SYMBOL(pci_get_subsys); EXPORT_SYMBOL(pci_get_slot); +EXPORT_SYMBOL(pci_get_class); diff -Nru a/drivers/scsi/eata.c b/drivers/scsi/eata.c --- a/drivers/scsi/eata.c 2004-08-30 17:46:36 -07:00 +++ b/drivers/scsi/eata.c 2004-08-30 17:46:36 -07:00 @@ -1005,7 +1005,7 @@ unsigned int addr; struct pci_dev *dev = NULL; - while((dev = pci_find_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) { + while((dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) { addr = pci_resource_start (dev, 0); #if defined(DEBUG_PCI_DETECT) @@ -1013,6 +1013,11 @@ driver_name, dev->bus->number, dev->devfn, addr); #endif + /* we are in so much trouble for a pci hotplug system with this driver + * anyway, so doing this at least lets people unload the driver and not + * cause memory problems, but in general this is a bad thing to do (this + * driver needs to be converted to the proper PCI api someday... */ + pci_dev_put(dev); if (addr + PCI_BASE_ADDRESS_0 == port_base) return dev; } @@ -1027,7 +1032,7 @@ struct pci_dev *dev = NULL; - while((dev = pci_find_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) { + while((dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) { #if defined(DEBUG_PCI_DETECT) printk("%s: enable_pci_ports, bus %d, devfn 0x%x.\n", @@ -1454,7 +1459,7 @@ for (k = 0; k < MAX_PCI; k++) { - if (!(dev = pci_find_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) break; + if (!(dev = pci_get_class(PCI_CLASS_STORAGE_SCSI << 8, dev))) break; if (pci_enable_device (dev)) { @@ -1478,6 +1483,7 @@ addr + PCI_BASE_ADDRESS_0; } + pci_dev_put(dev); #endif /* end CONFIG_PCI */ return; diff -Nru a/include/linux/pci.h b/include/linux/pci.h --- a/include/linux/pci.h 2004-08-30 17:46:36 -07:00 +++ b/include/linux/pci.h 2004-08-30 17:46:36 -07:00 @@ -719,10 +719,6 @@ struct pci_dev *pci_find_device (unsigned int vendor, unsigned int device, const struct pci_dev *from); struct pci_dev *pci_find_device_reverse (unsigned int vendor, unsigned int device, const struct pci_dev *from); -struct pci_dev *pci_find_subsys (unsigned int vendor, unsigned int device, - unsigned int ss_vendor, unsigned int ss_device, - const struct pci_dev *from); -struct pci_dev *pci_find_class (unsigned int class, const struct pci_dev *from); struct pci_dev *pci_find_slot (unsigned int bus, unsigned int devfn); int pci_find_capability (struct pci_dev *dev, int cap); int pci_find_ext_capability (struct pci_dev *dev, int cap); @@ -733,6 +729,7 @@ unsigned int ss_vendor, unsigned int ss_device, struct pci_dev *from); struct pci_dev *pci_get_slot (struct pci_bus *bus, unsigned int devfn); +struct pci_dev *pci_get_class (unsigned int class, struct pci_dev *from); int pci_bus_read_config_byte (struct pci_bus *bus, unsigned int devfn, int where, u8 *val); int pci_bus_read_config_word (struct pci_bus *bus, unsigned int devfn, int where, u16 *val); @@ -882,21 +879,17 @@ static inline struct pci_dev *pci_find_device(unsigned int vendor, unsigned int device, const struct pci_dev *from) { return NULL; } -static inline struct pci_dev *pci_find_class(unsigned int class, const struct pci_dev *from) -{ return NULL; } - static inline struct pci_dev *pci_find_slot(unsigned int bus, unsigned int devfn) { return NULL; } -static inline struct pci_dev *pci_find_subsys(unsigned int vendor, unsigned int device, -unsigned int ss_vendor, unsigned int ss_device, const struct pci_dev *from) -{ return NULL; } - static inline struct pci_dev *pci_get_device (unsigned int vendor, unsigned int device, struct pci_dev *from) { return NULL; } static inline struct pci_dev *pci_get_subsys (unsigned int vendor, unsigned int device, unsigned int ss_vendor, unsigned int ss_device, struct pci_dev *from) +{ return NULL; } + +static inline struct pci_dev *pci_get_class(unsigned int class, struct pci_dev *from) { return NULL; } static inline void pci_set_master(struct pci_dev *dev) { }