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
9#define _INTEL_ISH_CLIENT_IF_H_9#define _INTEL_ISH_CLIENT_IF_H_
10 10
11#include <linux/device.h>11#include <linux/device.h>
12#include <linux/uuid.h>12#include <linux/mod_devicetable.h>
13 13
14struct ishtp_cl_device;14struct ishtp_cl_device;
15struct ishtp_device;15struct ishtp_device;
@@ -40,7 +40,7 @@ enum cl_state { · 24 unmodified lines
40struct ishtp_cl_driver {40struct ishtp_cl_driver {
41 struct device_driver driver;41 struct device_driver driver;
42 const char *name;42 const char *name;
43 const guid_t *guid;43 const struct ishtp_device_id *id;
44 int (*probe)(struct ishtp_cl_device *dev);44 int (*probe)(struct ishtp_cl_device *dev);
45 void (*remove)(struct ishtp_cl_device *dev);45 void (*remove)(struct ishtp_cl_device *dev);
46 int (*reset)(struct ishtp_cl_device *dev);46 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
902/**902/**
903 * struct ishtp_device_id - ISHTP device identifier903 * struct ishtp_device_id - ISHTP device identifier
904 * @guid: GUID of the device.904 * @guid: GUID of the device.
905 * @driver_data: pointer to driver specific data
905 */906 */
906struct ishtp_device_id {907struct ishtp_device_id {
907 guid_t guid;908 guid_t guid;
909 kernel_ulong_t driver_data;
908};910};
909 911
910#endif /* LINUX_MOD_DEVICETABLE_H */912#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