Merge branch 'for-3.15/hid-core-ll-transport-cleanup' into for-linus
[firefly-linux-kernel-4.4.55.git] / drivers / hid / hid-sony.c
index 4884bb567bf88ab0a71030c6eb9666c4fc88cbab..b3e82585309e51ec85297d4be4e797871a71f21a 100644 (file)
@@ -1670,6 +1670,10 @@ static int sony_probe(struct hid_device *hdev, const struct hid_device_id *id)
                        goto err_stop;
        }
 
+       if (sc->quirks & SONY_FF_SUPPORT) {
+               ret = sony_init_ff(hdev);
+               if (ret < 0)
+                       goto err_stop;
        if (sc->quirks & SONY_BATTERY_SUPPORT) {
                ret = sony_battery_probe(sc);
                if (ret < 0)
@@ -1711,6 +1715,8 @@ static void sony_remove(struct hid_device *hdev)
        if (sc->quirks & SONY_LED_SUPPORT)
                sony_leds_remove(hdev);
 
+       if (sc->worker_initialized)
+               cancel_work_sync(&sc->state_worker);
        if (sc->quirks & SONY_BATTERY_SUPPORT) {
                hid_hw_close(hdev);
                sony_battery_remove(sc);