Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

HID: hid-lg4ff: Remove double underscore prefix from numeric types

Remove double underscore prefix from numeric types. This code will never be used
outside the kernel so the prefixes are unnecessary.

Signed-off-by: Michal Malý <madcatxster@devoid-pointer.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>

authored by

Michal Malý and committed by
Jiri Kosina
2a552c30 e0393062

+28 -28
+26 -26
drivers/hid/hid-lg4ff.c
··· 72 72 static void hid_lg4ff_set_range_g25(struct hid_device *hid, u16 range); 73 73 74 74 struct lg4ff_device_entry { 75 - __u32 product_id; 76 - __u16 range; 77 - __u16 min_range; 78 - __u16 max_range; 75 + u32 product_id; 76 + u16 range; 77 + u16 min_range; 78 + u16 max_range; 79 79 #ifdef CONFIG_LEDS_CLASS 80 - __u8 led_state; 80 + u8 led_state; 81 81 struct led_classdev *led[5]; 82 82 #endif 83 83 u32 alternate_modes; ··· 95 95 }; 96 96 97 97 struct lg4ff_wheel { 98 - const __u32 product_id; 98 + const u32 product_id; 99 99 const signed short *ff_effects; 100 - const __u16 min_range; 101 - const __u16 max_range; 100 + const u16 min_range; 101 + const u16 max_range; 102 102 void (*set_range)(struct hid_device *hid, u16 range); 103 103 }; 104 104 105 105 struct lg4ff_compat_mode_switch { 106 - const __u8 cmd_count; /* Number of commands to send */ 107 - const __u8 cmd[]; 106 + const u8 cmd_count; /* Number of commands to send */ 107 + const u8 cmd[]; 108 108 }; 109 109 110 110 struct lg4ff_wheel_ident_info { ··· 245 245 }; 246 246 247 247 /* Recalculates X axis value accordingly to currently selected range */ 248 - static __s32 lg4ff_adjust_dfp_x_axis(__s32 value, __u16 range) 248 + static s32 lg4ff_adjust_dfp_x_axis(s32 value, u16 range) 249 249 { 250 - __u16 max_range; 251 - __s32 new_value; 250 + u16 max_range; 251 + s32 new_value; 252 252 253 253 if (range == 900) 254 254 return value; ··· 269 269 } 270 270 271 271 int lg4ff_adjust_input_event(struct hid_device *hid, struct hid_field *field, 272 - struct hid_usage *usage, __s32 value, struct lg_drv_data *drv_data) 272 + struct hid_usage *usage, s32 value, struct lg_drv_data *drv_data) 273 273 { 274 274 struct lg4ff_device_entry *entry = drv_data->device_props; 275 - __s32 new_value = 0; 275 + s32 new_value = 0; 276 276 277 277 if (!entry) { 278 278 hid_err(hid, "Device properties not found"); ··· 299 299 struct hid_device *hid = input_get_drvdata(dev); 300 300 struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; 301 301 struct hid_report *report = list_entry(report_list->next, struct hid_report, list); 302 - __s32 *value = report->field[0]->value; 302 + s32 *value = report->field[0]->value; 303 303 int x; 304 304 305 305 #define CLAMP(x) do { if (x < 0) x = 0; else if (x > 0xff) x = 0xff; } while (0) ··· 344 344 struct hid_device *hid = input_get_drvdata(dev); 345 345 struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; 346 346 struct hid_report *report = list_entry(report_list->next, struct hid_report, list); 347 - __s32 *value = report->field[0]->value; 348 - __u32 expand_a, expand_b; 347 + s32 *value = report->field[0]->value; 348 + u32 expand_a, expand_b; 349 349 struct lg4ff_device_entry *entry; 350 350 struct lg_drv_data *drv_data; 351 351 ··· 421 421 struct hid_device *hid = input_get_drvdata(dev); 422 422 struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; 423 423 struct hid_report *report = list_entry(report_list->next, struct hid_report, list); 424 - __s32 *value = report->field[0]->value; 424 + s32 *value = report->field[0]->value; 425 425 magnitude = magnitude * 90 / 65535; 426 426 427 427 value[0] = 0xfe; ··· 440 440 { 441 441 struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; 442 442 struct hid_report *report = list_entry(report_list->next, struct hid_report, list); 443 - __s32 *value = report->field[0]->value; 443 + s32 *value = report->field[0]->value; 444 444 445 445 dbg_hid("G25/G27/DFGT: setting range to %u\n", range); 446 446 ··· 456 456 } 457 457 458 458 /* Sends commands to set range compatible with Driving Force Pro wheel */ 459 - static void hid_lg4ff_set_range_dfp(struct hid_device *hid, __u16 range) 459 + static void hid_lg4ff_set_range_dfp(struct hid_device *hid, u16 range) 460 460 { 461 461 struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; 462 462 struct hid_report *report = list_entry(report_list->next, struct hid_report, list); 463 463 int start_left, start_right, full_range; 464 - __s32 *value = report->field[0]->value; 464 + s32 *value = report->field[0]->value; 465 465 466 466 dbg_hid("Driving Force Pro: setting range to %u\n", range); 467 467 ··· 571 571 { 572 572 struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; 573 573 struct hid_report *report = list_entry(report_list->next, struct hid_report, list); 574 - __s32 *value = report->field[0]->value; 574 + s32 *value = report->field[0]->value; 575 575 u8 i; 576 576 577 577 for (i = 0; i < s->cmd_count; i++) { ··· 754 754 struct hid_device *hid = to_hid_device(dev); 755 755 struct lg4ff_device_entry *entry; 756 756 struct lg_drv_data *drv_data; 757 - __u16 range = simple_strtoul(buf, NULL, 10); 757 + u16 range = simple_strtoul(buf, NULL, 10); 758 758 759 759 drv_data = hid_get_drvdata(hid); 760 760 if (!drv_data) { ··· 818 818 static DEVICE_ATTR(real_id, S_IRUGO, lg4ff_real_id_show, lg4ff_real_id_store); 819 819 820 820 #ifdef CONFIG_LEDS_CLASS 821 - static void lg4ff_set_leds(struct hid_device *hid, __u8 leds) 821 + static void lg4ff_set_leds(struct hid_device *hid, u8 leds) 822 822 { 823 823 struct list_head *report_list = &hid->report_enum[HID_OUTPUT_REPORT].report_list; 824 824 struct hid_report *report = list_entry(report_list->next, struct hid_report, list); 825 - __s32 *value = report->field[0]->value; 825 + s32 *value = report->field[0]->value; 826 826 827 827 value[0] = 0xf8; 828 828 value[1] = 0x12;
+2 -2
drivers/hid/hid-lg4ff.h
··· 5 5 extern int lg4ff_no_autoswitch; /* From hid-lg.c */ 6 6 7 7 int lg4ff_adjust_input_event(struct hid_device *hid, struct hid_field *field, 8 - struct hid_usage *usage, __s32 value, struct lg_drv_data *drv_data); 8 + struct hid_usage *usage, s32 value, struct lg_drv_data *drv_data); 9 9 int lg4ff_init(struct hid_device *hdev); 10 10 int lg4ff_deinit(struct hid_device *hdev); 11 11 #else 12 12 static inline int lg4ff_adjust_input_event(struct hid_device *hid, struct hid_field *field, 13 - struct hid_usage *usage, __s32 value, struct lg_drv_data *drv_data) { return 0; } 13 + struct hid_usage *usage, s32 value, struct lg_drv_data *drv_data) { return 0; } 14 14 static inline int lg4ff_init(struct hid_device *hdev) { return -1; } 15 15 static inline int lg4ff_deinit(struct hid_device *hdev) { return -1; } 16 16 #endif