summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <greg@kroah.com>2003-08-18 01:22:01 -0700
committerGreg Kroah-Hartman <greg@kroah.com>2003-08-18 01:22:01 -0700
commit7c8114e7088a4db8eea6383626a4232c7031fb80 (patch)
tree05f173d3de631b0ad20949499124f821070e4499 /include/linux
parent2b338f7cdd70dfa1745459c1d87b709d650c940f (diff)
[PATCH] PCI: add PCI_DEVICE_CLASS() macro to match PCI_DEVICE() macro.
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pci.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/include/linux/pci.h b/include/linux/pci.h
index 90619534463e..55e296dd57e3 100644
--- a/include/linux/pci.h
+++ b/include/linux/pci.h
@@ -537,6 +537,20 @@ struct pci_driver {
.vendor = (vend), .device = (dev), \
.subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
+/**
+ * PCI_DEVICE_CLASS - macro used to describe a specific pci device class
+ * @dev_class: the class, subclass, prog-if triple for this device
+ * @dev_class_mask: the class mask for this device
+ *
+ * This macro is used to create a struct pci_device_id that matches a
+ * specific PCI class. The vendor, device, subvendor, and subdevice
+ * fields will be set to PCI_ANY_ID.
+ */
+#define PCI_DEVICE_CLASS(dev_class,dev_class_mask) \
+ .class = (dev_class), .class_mask = (dev_class_mask), \
+ .vendor = PCI_ANY_ID, .device = PCI_ANY_ID, \
+ .subvendor = PCI_ANY_ID, .subdevice = PCI_ANY_ID
+
/* these external functions are only available when PCI support is enabled */
#ifdef CONFIG_PCI