diff options
Diffstat (limited to 'drivers/hid/hid-logitech-hidpp.c')
-rw-r--r-- | drivers/hid/hid-logitech-hidpp.c | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/drivers/hid/hid-logitech-hidpp.c b/drivers/hid/hid-logitech-hidpp.c index 15ed6177a7a3..199cc256e9d9 100644 --- a/drivers/hid/hid-logitech-hidpp.c +++ b/drivers/hid/hid-logitech-hidpp.c | |||
@@ -2111,6 +2111,13 @@ static int hidpp_ff_init(struct hidpp_device *hidpp, u8 feature_index) | |||
2111 | kfree(data); | 2111 | kfree(data); |
2112 | return -ENOMEM; | 2112 | return -ENOMEM; |
2113 | } | 2113 | } |
2114 | data->wq = create_singlethread_workqueue("hidpp-ff-sendqueue"); | ||
2115 | if (!data->wq) { | ||
2116 | kfree(data->effect_ids); | ||
2117 | kfree(data); | ||
2118 | return -ENOMEM; | ||
2119 | } | ||
2120 | |||
2114 | data->hidpp = hidpp; | 2121 | data->hidpp = hidpp; |
2115 | data->feature_index = feature_index; | 2122 | data->feature_index = feature_index; |
2116 | data->version = version; | 2123 | data->version = version; |
@@ -2155,7 +2162,6 @@ static int hidpp_ff_init(struct hidpp_device *hidpp, u8 feature_index) | |||
2155 | /* ignore boost value at response.fap.params[2] */ | 2162 | /* ignore boost value at response.fap.params[2] */ |
2156 | 2163 | ||
2157 | /* init the hardware command queue */ | 2164 | /* init the hardware command queue */ |
2158 | data->wq = create_singlethread_workqueue("hidpp-ff-sendqueue"); | ||
2159 | atomic_set(&data->workqueue_size, 0); | 2165 | atomic_set(&data->workqueue_size, 0); |
2160 | 2166 | ||
2161 | /* initialize with zero autocenter to get wheel in usable state */ | 2167 | /* initialize with zero autocenter to get wheel in usable state */ |
@@ -2608,8 +2614,9 @@ static int m560_raw_event(struct hid_device *hdev, u8 *data, int size) | |||
2608 | input_report_rel(mydata->input, REL_Y, v); | 2614 | input_report_rel(mydata->input, REL_Y, v); |
2609 | 2615 | ||
2610 | v = hid_snto32(data[6], 8); | 2616 | v = hid_snto32(data[6], 8); |
2611 | hidpp_scroll_counter_handle_scroll( | 2617 | if (v != 0) |
2612 | &hidpp->vertical_wheel_counter, v); | 2618 | hidpp_scroll_counter_handle_scroll( |
2619 | &hidpp->vertical_wheel_counter, v); | ||
2613 | 2620 | ||
2614 | input_sync(mydata->input); | 2621 | input_sync(mydata->input); |
2615 | } | 2622 | } |