diff options
| author | Jiri Kosina <jkosina@suse.com> | 2026-06-16 22:49:20 +0300 |
|---|---|---|
| committer | Jiri Kosina <jkosina@suse.com> | 2026-06-16 22:49:20 +0300 |
| commit | a78ff6ed8c880bd35c5cc71830e927daa9ef7e90 (patch) | |
| tree | 3338bf1b4f0a9b92305094184ba255ab6e65496c | |
| parent | 8f41a4f92731ae5a79780d9d55f5be33cf54f6d0 (diff) | |
| parent | ebf441556f373ba9dca8e853c8f5c00f13500ce4 (diff) | |
| download | linux-a78ff6ed8c880bd35c5cc71830e927daa9ef7e90.tar.xz | |
Merge branch 'for-7.2/sony' into for-linus
| -rw-r--r-- | drivers/hid/hid-sony.c | 17 |
1 files changed, 4 insertions, 13 deletions
diff --git a/drivers/hid/hid-sony.c b/drivers/hid/hid-sony.c index 315343415e8f..e75246d29e16 100644 --- a/drivers/hid/hid-sony.c +++ b/drivers/hid/hid-sony.c @@ -1852,18 +1852,8 @@ static int sony_play_effect(struct input_dev *dev, void *data, static int sony_init_ff(struct sony_sc *sc) { - struct hid_input *hidinput; - struct input_dev *input_dev; - - if (list_empty(&sc->hdev->inputs)) { - hid_err(sc->hdev, "no inputs found\n"); - return -ENODEV; - } - hidinput = list_entry(sc->hdev->inputs.next, struct hid_input, list); - input_dev = hidinput->input; - - input_set_capability(input_dev, EV_FF, FF_RUMBLE); - return input_ff_create_memless(input_dev, NULL, sony_play_effect); + input_set_capability(sc->input_dev, EV_FF, FF_RUMBLE); + return input_ff_create_memless(sc->input_dev, NULL, sony_play_effect); } #else @@ -2150,6 +2140,8 @@ static int sony_input_configured(struct hid_device *hdev, int append_dev_id; int ret; + sc->input_dev = hidinput->input; + ret = sony_set_device_id(sc); if (ret < 0) { hid_err(hdev, "failed to allocate the device id\n"); @@ -2310,7 +2302,6 @@ static int sony_input_configured(struct hid_device *hdev, goto err_close; } - sc->input_dev = hidinput->input; return 0; err_close: hid_hw_close(hdev); |
