History

Input: allow matching device IDs on property bits

Let's allow matching input devices on their property bits, both in-kernel and when generating module aliases.

Dmitry Torokhov committed 9 years ago

Commit 8724ecb1 parent 55dfce85 files · +15 −2Browse files

Showing the changes to include/linux (2 of 5 files). Show all

Unified · Split

2 files
  1. include/linux/input.h +4 −0
  2. include/linux/mod_devicetable.h +3 −0
include/linux/input.h+4−0
@@ -234,6 +234,10 @@ struct input_dev { · 233 unmodified lines
234234 #error "SW_MAX and INPUT_DEVICE_ID_SW_MAX do not match"
235235 #endif
236236
237+#if INPUT_PROP_MAX != INPUT_DEVICE_ID_PROP_MAX
238+#error "INPUT_PROP_MAX and INPUT_DEVICE_ID_PROP_MAX do not match"
239+#endif
240+
237241 #define INPUT_DEVICE_ID_MATCH_DEVICE \
238242 (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT)
239243 #define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION \
include/linux/mod_devicetable.h+3−0
@@ -293,6 +293,7 @@ struct pcmcia_device_id { · 292 unmodified lines
293293 #define INPUT_DEVICE_ID_SND_MAX 0x07
294294 #define INPUT_DEVICE_ID_FF_MAX 0x7f
295295 #define INPUT_DEVICE_ID_SW_MAX 0x0f
296+#define INPUT_DEVICE_ID_PROP_MAX 0x1f
296297
297298 #define INPUT_DEVICE_ID_MATCH_BUS 1
298299 #define INPUT_DEVICE_ID_MATCH_VENDOR 2
@@ -308,6 +309,7 @@ struct pcmcia_device_id { · 9 unmodified lines
308309 #define INPUT_DEVICE_ID_MATCH_SNDBIT 0x0400
309310 #define INPUT_DEVICE_ID_MATCH_FFBIT 0x0800
310311 #define INPUT_DEVICE_ID_MATCH_SWBIT 0x1000
312+#define INPUT_DEVICE_ID_MATCH_PROPBIT 0x2000
311313
312314 struct input_device_id {
313315
@@ -327,6 +329,7 @@ struct input_device_id { · 13 unmodified lines
327329 kernel_ulong_t sndbit[INPUT_DEVICE_ID_SND_MAX / BITS_PER_LONG + 1];
328330 kernel_ulong_t ffbit[INPUT_DEVICE_ID_FF_MAX / BITS_PER_LONG + 1];
329331 kernel_ulong_t swbit[INPUT_DEVICE_ID_SW_MAX / BITS_PER_LONG + 1];
332+ kernel_ulong_t propbit[INPUT_DEVICE_ID_PROP_MAX / BITS_PER_LONG + 1];
330333
331334 kernel_ulong_t driver_info;
332335 };

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