b/drivers/hid/hid-logitech-hidpp.c
@@ -360,15 +360,16 @@ static int hidpp_send_fap_command_sync(struct
hidpp_device *hidpp,
}
static int hidpp_send_rap_command_sync(struct hidpp_device *hidpp_dev,
- u8 report_id, u8 sub_id, u8 reg_address, u8 *params, int
param_count,
+ u8 sub_id, u8 reg_address, u8 *params, int param_count,
struct hidpp_report *response)
{
struct hidpp_report *message;
int ret, max_count;
+ u8 report_id;
- /* Send as long report if short reports are not supported. */
- if (report_id == REPORT_ID_HIDPP_SHORT &&
- !(hidpp_dev->supported_reports &
HIDPP_REPORT_SHORT_SUPPORTED))
+ if (hidpp_dev->supported_reports & HIDPP_REPORT_SHORT_SUPPORTED)
+ report_id = REPORT_ID_HIDPP_SHORT;
+ else