[Intel-gfx] [PATCH v2] drm/i915: reword documentation of possible pci_device_id struct
Lucas De Marchi
lucas.demarchi at intel.com
Wed Sep 5 20:19:43 UTC 2018
Document it like a real struct for ease of copy and paste, remove
comment of C99 compatibility and document that in some cases the first 2
fields can be u16.
v2: - remove mention to (non-existent) PCI_DEVICE_ANY and better explain
use of __u16 in first 2 fields
Cc: Chris Wilson <chris at chris-wilson.co.uk>
Signed-off-by: Lucas De Marchi <lucas.demarchi at intel.com>
---
include/drm/i915_pciids.h | 17 ++++++++++-------
1 file changed, 10 insertions(+), 7 deletions(-)
diff --git a/include/drm/i915_pciids.h b/include/drm/i915_pciids.h
index 754ce4b10129..0f15d7b2e8ea 100644
--- a/include/drm/i915_pciids.h
+++ b/include/drm/i915_pciids.h
@@ -26,14 +26,17 @@
#define _I915_PCIIDS_H
/*
- * A pci_device_id struct {
- * __u32 vendor, device;
- * __u32 subvendor, subdevice;
- * __u32 class, class_mask;
- * kernel_ulong_t driver_data;
+ * These macros can be used with a struct declared like this:
+ *
+ * struct pci_device_id {
+ * __u32 vendor, device;
+ * __u32 subvendor, subdevice;
+ * __u32 class, class_mask;
+ * kernel_ulong_t driver_data;
* };
- * Don't use C99 here because "class" is reserved and we want to
- * give userspace flexibility.
+ *
+ * This matches the struct used in the kernel. First two fields may be
+ * changed to __u16 if using this header in a userspace program.
*/
#define INTEL_VGA_DEVICE(id, info) { \
0x8086, id, \
--
2.17.1
More information about the Intel-gfx
mailing list