diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-10-09 15:01:14 -0400 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2017-10-19 19:54:49 -0400 |
commit | 8724ecb072293f109a6f5dc93be8a98bf61fe14f (patch) | |
tree | f63e205ecb0af4420d175b29832992db8fcfc1d3 /scripts/mod/file2alias.c | |
parent | 55dfce873dca46df00304c44a568d7933bffff89 (diff) |
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.
Tested-by: Roderick Colenbrander <roderick.colenbrander@sony.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Diffstat (limited to 'scripts/mod/file2alias.c')
-rw-r--r-- | scripts/mod/file2alias.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/scripts/mod/file2alias.c b/scripts/mod/file2alias.c index 29d6699d5a06..bc25898f6df0 100644 --- a/scripts/mod/file2alias.c +++ b/scripts/mod/file2alias.c | |||
@@ -761,7 +761,7 @@ static void do_input(char *alias, | |||
761 | sprintf(alias + strlen(alias), "%X,*", i); | 761 | sprintf(alias + strlen(alias), "%X,*", i); |
762 | } | 762 | } |
763 | 763 | ||
764 | /* input:b0v0p0e0-eXkXrXaXmXlXsXfXwX where X is comma-separated %02X. */ | 764 | /* input:b0v0p0e0-eXkXrXaXmXlXsXfXwXprX where X is comma-separated %02X. */ |
765 | static int do_input_entry(const char *filename, void *symval, | 765 | static int do_input_entry(const char *filename, void *symval, |
766 | char *alias) | 766 | char *alias) |
767 | { | 767 | { |
@@ -779,6 +779,7 @@ static int do_input_entry(const char *filename, void *symval, | |||
779 | DEF_FIELD_ADDR(symval, input_device_id, sndbit); | 779 | DEF_FIELD_ADDR(symval, input_device_id, sndbit); |
780 | DEF_FIELD_ADDR(symval, input_device_id, ffbit); | 780 | DEF_FIELD_ADDR(symval, input_device_id, ffbit); |
781 | DEF_FIELD_ADDR(symval, input_device_id, swbit); | 781 | DEF_FIELD_ADDR(symval, input_device_id, swbit); |
782 | DEF_FIELD_ADDR(symval, input_device_id, propbit); | ||
782 | 783 | ||
783 | sprintf(alias, "input:"); | 784 | sprintf(alias, "input:"); |
784 | 785 | ||
@@ -816,6 +817,9 @@ static int do_input_entry(const char *filename, void *symval, | |||
816 | sprintf(alias + strlen(alias), "w*"); | 817 | sprintf(alias + strlen(alias), "w*"); |
817 | if (flags & INPUT_DEVICE_ID_MATCH_SWBIT) | 818 | if (flags & INPUT_DEVICE_ID_MATCH_SWBIT) |
818 | do_input(alias, *swbit, 0, INPUT_DEVICE_ID_SW_MAX); | 819 | do_input(alias, *swbit, 0, INPUT_DEVICE_ID_SW_MAX); |
820 | sprintf(alias + strlen(alias), "pr*"); | ||
821 | if (flags & INPUT_DEVICE_ID_MATCH_PROPBIT) | ||
822 | do_input(alias, *propbit, 0, INPUT_DEVICE_ID_PROP_MAX); | ||
819 | return 1; | 823 | return 1; |
820 | } | 824 | } |
821 | ADD_TO_DEVTABLE("input", input_device_id, do_input_entry); | 825 | ADD_TO_DEVTABLE("input", input_device_id, do_input_entry); |