A late addititon to the intel-ish-hid framework caused a build failure with clang, and introduced an ABI to the module loader that stops working if any driver ever needs to bind to more than one UUID: drivers/hid/intel-ish-hid/ishtp-fw-loader.c:1067:4: error: initializer element is not a compile-time constant Change the ishtp_device_id to have correct documentation and a driver_data field like all the other ones, and change the drivers to use the ID table as the primary identification in a way that works with all compilers and avoids duplciating the identifiers.
Showing the changes to include (2 of 7 files). Show all
Unified · Split
| @@ -9,7 +9,7 @@ · 8 unmodified lines | ||
| 9 | 9 | #define _INTEL_ISH_CLIENT_IF_H_ |
| 10 | 10 | |
| 11 | 11 | #include <linux/device.h> |
| 12 | −#include <linux/uuid.h> | |
| 12 | +#include <linux/mod_devicetable.h> | |
| 13 | 13 | |
| 14 | 14 | struct ishtp_cl_device; |
| 15 | 15 | struct ishtp_device; |
| @@ -40,7 +40,7 @@ enum cl_state { · 24 unmodified lines | ||
| 40 | 40 | struct ishtp_cl_driver { |
| 41 | 41 | struct device_driver driver; |
| 42 | 42 | const char *name; |
| 43 | − const guid_t *guid; | |
| 43 | + const struct ishtp_device_id *id; | |
| 44 | 44 | int (*probe)(struct ishtp_cl_device *dev); |
| 45 | 45 | void (*remove)(struct ishtp_cl_device *dev); |
| 46 | 46 | int (*reset)(struct ishtp_cl_device *dev); |
| @@ -902,9 +902,11 @@ struct dfl_device_id { · 901 unmodified lines | ||
| 902 | 902 | /** |
| 903 | 903 | * struct ishtp_device_id - ISHTP device identifier |
| 904 | 904 | * @guid: GUID of the device. |
| 905 | + * @driver_data: pointer to driver specific data | |
| 905 | 906 | */ |
| 906 | 907 | struct ishtp_device_id { |
| 907 | 908 | guid_t guid; |
| 909 | + kernel_ulong_t driver_data; | |
| 908 | 910 | }; |
| 909 | 911 | |
| 910 | 912 | #endif /* LINUX_MOD_DEVICETABLE_H */ |