@@ -2078,7 +2078,12 @@ static DEVICE_ATTR(range, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH, hidpp
2078
2078
static void hidpp_ff_destroy (struct ff_device * ff )
2079
2079
{
2080
2080
struct hidpp_ff_private_data * data = ff -> private ;
2081
+ struct hid_device * hid = data -> hidpp -> hid_dev ;
2081
2082
2083
+ hid_info (hid , "Unloading HID++ force feedback.\n" );
2084
+
2085
+ device_remove_file (& hid -> dev , & dev_attr_range );
2086
+ destroy_workqueue (data -> wq );
2082
2087
kfree (data -> effect_ids );
2083
2088
}
2084
2089
@@ -2170,31 +2175,6 @@ static int hidpp_ff_init(struct hidpp_device *hidpp,
2170
2175
return 0 ;
2171
2176
}
2172
2177
2173
- static int hidpp_ff_deinit (struct hid_device * hid )
2174
- {
2175
- struct hid_input * hidinput = list_entry (hid -> inputs .next , struct hid_input , list );
2176
- struct input_dev * dev = hidinput -> input ;
2177
- struct hidpp_ff_private_data * data ;
2178
-
2179
- if (!dev ) {
2180
- hid_err (hid , "Struct input_dev not found!\n" );
2181
- return - EINVAL ;
2182
- }
2183
-
2184
- hid_info (hid , "Unloading HID++ force feedback.\n" );
2185
- data = dev -> ff -> private ;
2186
- if (!data ) {
2187
- hid_err (hid , "Private data not found!\n" );
2188
- return - EINVAL ;
2189
- }
2190
-
2191
- destroy_workqueue (data -> wq );
2192
- device_remove_file (& hid -> dev , & dev_attr_range );
2193
-
2194
- return 0 ;
2195
- }
2196
-
2197
-
2198
2178
/* ************************************************************************** */
2199
2179
/* */
2200
2180
/* Device Support */
@@ -3713,9 +3693,6 @@ static void hidpp_remove(struct hid_device *hdev)
3713
3693
3714
3694
sysfs_remove_group (& hdev -> dev .kobj , & ps_attribute_group );
3715
3695
3716
- if (hidpp -> quirks & HIDPP_QUIRK_CLASS_G920 )
3717
- hidpp_ff_deinit (hdev );
3718
-
3719
3696
hid_hw_stop (hdev );
3720
3697
cancel_work_sync (& hidpp -> work );
3721
3698
mutex_destroy (& hidpp -> send_mutex );
0 commit comments