History

HID: intel-ish-hid: fix module device-id handling

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.

Arnd Bergmann committed 5 years ago

Commit bf9167a1 parent 64355db7 files · +37 −47Browse files

Showing the changes to include (2 of 7 files). Show all

Unified · Split

2 files
  1. include/linux/intel-ish-client-if.h +2 −2
  2. include/linux/mod_devicetable.h +2 −0
include/linux/intel-ish-client-if.h+2−2
@@ -9,7 +9,7 @@ · 8 unmodified lines
99 #define _INTEL_ISH_CLIENT_IF_H_
1010
1111 #include <linux/device.h>
12−#include <linux/uuid.h>
12+#include <linux/mod_devicetable.h>
1313
1414 struct ishtp_cl_device;
1515 struct ishtp_device;
@@ -40,7 +40,7 @@ enum cl_state { · 24 unmodified lines
4040 struct ishtp_cl_driver {
4141 struct device_driver driver;
4242 const char *name;
43− const guid_t *guid;
43+ const struct ishtp_device_id *id;
4444 int (*probe)(struct ishtp_cl_device *dev);
4545 void (*remove)(struct ishtp_cl_device *dev);
4646 int (*reset)(struct ishtp_cl_device *dev);
include/linux/mod_devicetable.h+2−0
@@ -902,9 +902,11 @@ struct dfl_device_id { · 901 unmodified lines
902902 /**
903903 * struct ishtp_device_id - ISHTP device identifier
904904 * @guid: GUID of the device.
905+ * @driver_data: pointer to driver specific data
905906 */
906907 struct ishtp_device_id {
907908 guid_t guid;
909+ kernel_ulong_t driver_data;
908910 };
909911
910912 #endif /* LINUX_MOD_DEVICETABLE_H */

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t