logo

live-bootstrap

Mirror of <https://github.com/fosslinux/live-bootstrap>

i2c-hid-dmi-quirks.patch (1415B)


  1. SPDX-FileCopyrightText: 2024 Gábor Stefanik <netrolller.3d@gmail.com>
  2. SPDX-License-Identifier: GPL-2.0-only
  3. Name the union in i2c_hid_desc_override, to avoid unknown field error
  4. --- linux-4.14.336/drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c.bak 2024-02-15 13:27:20.177877726 +0100
  5. +++ linux-4.14.336/drivers/hid/i2c-hid/i2c-hid-dmi-quirks.c 2024-02-15 15:11:15.787482938 +0100
  6. @@ -18,7 +18,7 @@
  7. union {
  8. struct i2c_hid_desc *i2c_hid_desc;
  9. uint8_t *i2c_hid_desc_buffer;
  10. - };
  11. + } u;
  12. uint8_t *hid_report_desc;
  13. unsigned int hid_report_desc_size;
  14. uint8_t *i2c_name;
  15. @@ -36,6 +36,7 @@
  16. */
  17. static const struct i2c_hid_desc_override sipodev_desc = {
  18. + .u = {
  19. .i2c_hid_desc_buffer = (uint8_t [])
  20. {0x1e, 0x00, /* Length of descriptor */
  21. 0x00, 0x01, /* Version of descriptor */
  22. @@ -52,6 +53,7 @@
  23. 0x06, 0x00, /* Version ID */
  24. 0x00, 0x00, 0x00, 0x00 /* Reserved */
  25. },
  26. + },
  27. .hid_report_desc = (uint8_t [])
  28. {0x05, 0x01, /* Usage Page (Desktop), */
  29. @@ -422,7 +424,7 @@
  30. if (strcmp(override->i2c_name, i2c_name))
  31. return NULL;
  32. - return override->i2c_hid_desc;
  33. + return override->u.i2c_hid_desc;
  34. }
  35. char *i2c_hid_get_dmi_hid_report_desc_override(uint8_t *i2c_name,