Andreas Schwab | 6543bec | 2013-01-20 17:58:47 +0100 | [diff] [blame] | 1 | #include <linux/kbuild.h> |
| 2 | #include <linux/mod_devicetable.h> |
| 3 | |
| 4 | #define DEVID(devid) DEFINE(SIZE_##devid, sizeof(struct devid)) |
| 5 | #define DEVID_FIELD(devid, field) \ |
| 6 | DEFINE(OFF_##devid##_##field, offsetof(struct devid, field)) |
| 7 | |
| 8 | int main(void) |
| 9 | { |
| 10 | DEVID(usb_device_id); |
| 11 | DEVID_FIELD(usb_device_id, match_flags); |
| 12 | DEVID_FIELD(usb_device_id, idVendor); |
| 13 | DEVID_FIELD(usb_device_id, idProduct); |
| 14 | DEVID_FIELD(usb_device_id, bcdDevice_lo); |
| 15 | DEVID_FIELD(usb_device_id, bcdDevice_hi); |
| 16 | DEVID_FIELD(usb_device_id, bDeviceClass); |
| 17 | DEVID_FIELD(usb_device_id, bDeviceSubClass); |
| 18 | DEVID_FIELD(usb_device_id, bDeviceProtocol); |
| 19 | DEVID_FIELD(usb_device_id, bInterfaceClass); |
| 20 | DEVID_FIELD(usb_device_id, bInterfaceSubClass); |
| 21 | DEVID_FIELD(usb_device_id, bInterfaceProtocol); |
| 22 | DEVID_FIELD(usb_device_id, bInterfaceNumber); |
| 23 | |
| 24 | DEVID(hid_device_id); |
| 25 | DEVID_FIELD(hid_device_id, bus); |
| 26 | DEVID_FIELD(hid_device_id, group); |
| 27 | DEVID_FIELD(hid_device_id, vendor); |
| 28 | DEVID_FIELD(hid_device_id, product); |
| 29 | |
| 30 | DEVID(ieee1394_device_id); |
| 31 | DEVID_FIELD(ieee1394_device_id, match_flags); |
| 32 | DEVID_FIELD(ieee1394_device_id, vendor_id); |
| 33 | DEVID_FIELD(ieee1394_device_id, model_id); |
| 34 | DEVID_FIELD(ieee1394_device_id, specifier_id); |
| 35 | DEVID_FIELD(ieee1394_device_id, version); |
| 36 | |
| 37 | DEVID(pci_device_id); |
| 38 | DEVID_FIELD(pci_device_id, vendor); |
| 39 | DEVID_FIELD(pci_device_id, device); |
| 40 | DEVID_FIELD(pci_device_id, subvendor); |
| 41 | DEVID_FIELD(pci_device_id, subdevice); |
| 42 | DEVID_FIELD(pci_device_id, class); |
| 43 | DEVID_FIELD(pci_device_id, class_mask); |
| 44 | |
| 45 | DEVID(ccw_device_id); |
| 46 | DEVID_FIELD(ccw_device_id, match_flags); |
| 47 | DEVID_FIELD(ccw_device_id, cu_type); |
| 48 | DEVID_FIELD(ccw_device_id, cu_model); |
| 49 | DEVID_FIELD(ccw_device_id, dev_type); |
| 50 | DEVID_FIELD(ccw_device_id, dev_model); |
| 51 | |
| 52 | DEVID(ap_device_id); |
| 53 | DEVID_FIELD(ap_device_id, dev_type); |
| 54 | |
| 55 | DEVID(css_device_id); |
| 56 | DEVID_FIELD(css_device_id, type); |
| 57 | |
| 58 | DEVID(serio_device_id); |
| 59 | DEVID_FIELD(serio_device_id, type); |
| 60 | DEVID_FIELD(serio_device_id, proto); |
| 61 | DEVID_FIELD(serio_device_id, id); |
| 62 | DEVID_FIELD(serio_device_id, extra); |
| 63 | |
| 64 | DEVID(acpi_device_id); |
| 65 | DEVID_FIELD(acpi_device_id, id); |
| 66 | |
| 67 | DEVID(pnp_device_id); |
| 68 | DEVID_FIELD(pnp_device_id, id); |
| 69 | |
| 70 | DEVID(pnp_card_device_id); |
| 71 | DEVID_FIELD(pnp_card_device_id, devs); |
| 72 | |
| 73 | DEVID(pcmcia_device_id); |
| 74 | DEVID_FIELD(pcmcia_device_id, match_flags); |
| 75 | DEVID_FIELD(pcmcia_device_id, manf_id); |
| 76 | DEVID_FIELD(pcmcia_device_id, card_id); |
| 77 | DEVID_FIELD(pcmcia_device_id, func_id); |
| 78 | DEVID_FIELD(pcmcia_device_id, function); |
| 79 | DEVID_FIELD(pcmcia_device_id, device_no); |
| 80 | DEVID_FIELD(pcmcia_device_id, prod_id_hash); |
| 81 | |
| 82 | DEVID(of_device_id); |
| 83 | DEVID_FIELD(of_device_id, name); |
| 84 | DEVID_FIELD(of_device_id, type); |
| 85 | DEVID_FIELD(of_device_id, compatible); |
| 86 | |
| 87 | DEVID(vio_device_id); |
| 88 | DEVID_FIELD(vio_device_id, type); |
| 89 | DEVID_FIELD(vio_device_id, compat); |
| 90 | |
| 91 | DEVID(input_device_id); |
| 92 | DEVID_FIELD(input_device_id, flags); |
| 93 | DEVID_FIELD(input_device_id, bustype); |
| 94 | DEVID_FIELD(input_device_id, vendor); |
| 95 | DEVID_FIELD(input_device_id, product); |
| 96 | DEVID_FIELD(input_device_id, version); |
| 97 | DEVID_FIELD(input_device_id, evbit); |
| 98 | DEVID_FIELD(input_device_id, keybit); |
| 99 | DEVID_FIELD(input_device_id, relbit); |
| 100 | DEVID_FIELD(input_device_id, absbit); |
| 101 | DEVID_FIELD(input_device_id, mscbit); |
| 102 | DEVID_FIELD(input_device_id, ledbit); |
| 103 | DEVID_FIELD(input_device_id, sndbit); |
| 104 | DEVID_FIELD(input_device_id, ffbit); |
| 105 | DEVID_FIELD(input_device_id, swbit); |
| 106 | |
| 107 | DEVID(eisa_device_id); |
| 108 | DEVID_FIELD(eisa_device_id, sig); |
| 109 | |
| 110 | DEVID(parisc_device_id); |
| 111 | DEVID_FIELD(parisc_device_id, hw_type); |
| 112 | DEVID_FIELD(parisc_device_id, hversion); |
| 113 | DEVID_FIELD(parisc_device_id, hversion_rev); |
| 114 | DEVID_FIELD(parisc_device_id, sversion); |
| 115 | |
| 116 | DEVID(sdio_device_id); |
| 117 | DEVID_FIELD(sdio_device_id, class); |
| 118 | DEVID_FIELD(sdio_device_id, vendor); |
| 119 | DEVID_FIELD(sdio_device_id, device); |
| 120 | |
| 121 | DEVID(ssb_device_id); |
| 122 | DEVID_FIELD(ssb_device_id, vendor); |
| 123 | DEVID_FIELD(ssb_device_id, coreid); |
| 124 | DEVID_FIELD(ssb_device_id, revision); |
| 125 | |
| 126 | DEVID(bcma_device_id); |
| 127 | DEVID_FIELD(bcma_device_id, manuf); |
| 128 | DEVID_FIELD(bcma_device_id, id); |
| 129 | DEVID_FIELD(bcma_device_id, rev); |
| 130 | DEVID_FIELD(bcma_device_id, class); |
| 131 | |
| 132 | DEVID(virtio_device_id); |
| 133 | DEVID_FIELD(virtio_device_id, device); |
| 134 | DEVID_FIELD(virtio_device_id, vendor); |
| 135 | |
| 136 | DEVID(hv_vmbus_device_id); |
| 137 | DEVID_FIELD(hv_vmbus_device_id, guid); |
| 138 | |
| 139 | DEVID(i2c_device_id); |
| 140 | DEVID_FIELD(i2c_device_id, name); |
| 141 | |
| 142 | DEVID(spi_device_id); |
| 143 | DEVID_FIELD(spi_device_id, name); |
| 144 | |
| 145 | DEVID(dmi_system_id); |
| 146 | DEVID_FIELD(dmi_system_id, matches); |
| 147 | |
| 148 | DEVID(platform_device_id); |
| 149 | DEVID_FIELD(platform_device_id, name); |
| 150 | |
| 151 | DEVID(mdio_device_id); |
| 152 | DEVID_FIELD(mdio_device_id, phy_id); |
| 153 | DEVID_FIELD(mdio_device_id, phy_id_mask); |
| 154 | |
| 155 | DEVID(zorro_device_id); |
| 156 | DEVID_FIELD(zorro_device_id, id); |
| 157 | |
| 158 | DEVID(isapnp_device_id); |
| 159 | DEVID_FIELD(isapnp_device_id, vendor); |
| 160 | DEVID_FIELD(isapnp_device_id, function); |
| 161 | |
| 162 | DEVID(ipack_device_id); |
| 163 | DEVID_FIELD(ipack_device_id, format); |
| 164 | DEVID_FIELD(ipack_device_id, vendor); |
| 165 | DEVID_FIELD(ipack_device_id, device); |
| 166 | |
| 167 | DEVID(amba_id); |
| 168 | DEVID_FIELD(amba_id, id); |
| 169 | DEVID_FIELD(amba_id, mask); |
| 170 | |
| 171 | DEVID(x86_cpu_id); |
| 172 | DEVID_FIELD(x86_cpu_id, feature); |
| 173 | DEVID_FIELD(x86_cpu_id, family); |
| 174 | DEVID_FIELD(x86_cpu_id, model); |
| 175 | DEVID_FIELD(x86_cpu_id, vendor); |
| 176 | |
Samuel Ortiz | e535410 | 2013-03-27 17:29:53 +0200 | [diff] [blame] | 177 | DEVID(mei_cl_device_id); |
| 178 | DEVID_FIELD(mei_cl_device_id, name); |
| 179 | |
Alexandre Bounine | 3bdbb62 | 2013-07-03 15:08:58 -0700 | [diff] [blame^] | 180 | DEVID(rio_device_id); |
| 181 | DEVID_FIELD(rio_device_id, did); |
| 182 | DEVID_FIELD(rio_device_id, vid); |
| 183 | DEVID_FIELD(rio_device_id, asm_did); |
| 184 | DEVID_FIELD(rio_device_id, asm_vid); |
| 185 | |
Andreas Schwab | 6543bec | 2013-01-20 17:58:47 +0100 | [diff] [blame] | 186 | return 0; |
| 187 | } |