@@ -48,6 +48,14 @@ static const u8 pidff_reports[] = {
48
48
/* device_control is really 0x95, but 0x96 specified as it is the usage of
49
49
the only field in that report */
50
50
51
+ /* PID special fields */
52
+
53
+ #define PID_EFFECT_TYPE 0x25
54
+ #define PID_DIRECTION 0x57
55
+ #define PID_EFFECT_OPERATION_ARRAY 0x78
56
+ #define PID_BLOCK_LOAD_STATUS 0x8b
57
+ #define PID_DEVICE_CONTROL_ARRAY 0x96
58
+
51
59
/* Value usage tables used to put fields and values into arrays */
52
60
53
61
#define PID_EFFECT_BLOCK_INDEX 0
@@ -1046,23 +1054,24 @@ static int pidff_find_special_fields(struct pidff_device *pidff)
1046
1054
1047
1055
pidff -> create_new_effect_type =
1048
1056
pidff_find_special_field (pidff -> reports [PID_CREATE_NEW_EFFECT ],
1049
- 0x25 , 1 );
1057
+ PID_EFFECT_TYPE , 1 );
1050
1058
pidff -> set_effect_type =
1051
1059
pidff_find_special_field (pidff -> reports [PID_SET_EFFECT ],
1052
- 0x25 , 1 );
1060
+ PID_EFFECT_TYPE , 1 );
1053
1061
pidff -> effect_direction =
1054
1062
pidff_find_special_field (pidff -> reports [PID_SET_EFFECT ],
1055
- 0x57 , 0 );
1063
+ PID_DIRECTION , 0 );
1056
1064
pidff -> device_control =
1057
1065
pidff_find_special_field (pidff -> reports [PID_DEVICE_CONTROL ],
1058
- 0x96 , !(pidff -> quirks & HID_PIDFF_QUIRK_PERMISSIVE_CONTROL ));
1066
+ PID_DEVICE_CONTROL_ARRAY ,
1067
+ !(pidff -> quirks & HID_PIDFF_QUIRK_PERMISSIVE_CONTROL ));
1059
1068
1060
1069
pidff -> block_load_status =
1061
1070
pidff_find_special_field (pidff -> reports [PID_BLOCK_LOAD ],
1062
- 0x8b , 1 );
1071
+ PID_BLOCK_LOAD_STATUS , 1 );
1063
1072
pidff -> effect_operation_status =
1064
1073
pidff_find_special_field (pidff -> reports [PID_EFFECT_OPERATION ],
1065
- 0x78 , 1 );
1074
+ PID_EFFECT_OPERATION_ARRAY , 1 );
1066
1075
1067
1076
hid_dbg (pidff -> hid , "search done\n" );
1068
1077
0 commit comments