Files
linux/include/linux
Sui Jingfeng d427da2323 PCI: Add pci_get_base_class() helper
There is no function to get all PCI devices in a system by matching
against the base class code only, ignoring the sub-class code and
the programming interface.  Add pci_get_base_class() to suit the
need.

For example, if a driver wants to process all PCI display devices in
a system, it can do so like this:

  pdev = NULL;
  while ((pdev = pci_get_base_class(PCI_BASE_CLASS_DISPLAY, pdev))) {
    do_something_for_pci_display_device(pdev);
  }

Link: https://lore.kernel.org/r/20230825062714.6325-2-sui.jingfeng@linux.dev
Signed-off-by: Sui Jingfeng <suijingfeng@loongson.cn>
[bhelgaas: reword commit log]
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
2023-09-28 16:49:44 -05:00
..
2023-06-16 12:27:04 -06:00
2023-05-20 19:20:30 +02:00
2023-05-19 23:23:52 +05:30
2023-08-23 08:21:37 +01:00
2023-08-25 20:55:47 +02:00
2023-08-09 08:21:22 +02:00
2023-05-31 13:06:57 +02:00
2023-05-25 09:26:19 +02:00
2023-08-24 16:20:30 -07:00
2023-09-01 00:29:34 +02:00
2023-08-31 12:47:15 +02:00
2023-06-13 16:49:23 +02:00
2023-06-09 17:30:47 +02:00
2023-05-01 17:50:18 -07:00
2023-08-04 11:02:46 +01:00
2023-08-05 08:18:04 -04:00
2023-07-14 13:47:07 -06:00
2023-08-18 10:12:10 -07:00
2023-08-15 14:57:25 -07:00
2023-08-18 10:18:59 -07:00
2023-07-11 14:12:19 -07:00
2023-06-20 20:17:10 -07:00
2023-05-24 18:08:49 +02:00
2023-06-19 15:08:12 -04:00
2023-08-18 10:12:25 -07:00
2023-08-21 14:28:45 -07:00
2023-06-23 16:59:30 -07:00
2023-09-28 16:49:44 -05:00
2023-06-05 09:36:39 +02:00
2023-07-18 10:07:47 +02:00
2023-08-12 09:18:47 -07:00
2023-05-23 12:55:12 -07:00
2023-09-02 15:17:33 -07:00
2023-07-15 11:34:49 -07:00
2023-06-23 16:59:28 -07:00
2023-05-18 19:52:31 -07:00
2023-06-11 18:22:47 +02:00
2023-07-18 10:07:47 +02:00
2023-06-05 09:36:39 +02:00
2023-06-24 15:50:13 -07:00
2023-08-21 13:37:26 -07:00
2023-08-06 08:24:55 +01:00
2023-08-07 17:55:54 +00:00
2023-08-11 21:12:47 +02:00
2023-08-24 13:27:47 -05:00
2023-08-21 14:52:16 +02:00
2023-08-21 13:37:27 -07:00