.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0-or-later |
---|
1 | 2 | /* |
---|
2 | 3 | * HID Driver for ELAN Touchpad |
---|
3 | 4 | * |
---|
4 | 5 | * Currently only supports touchpad found on HP Pavilion X2 10 |
---|
5 | 6 | * |
---|
6 | 7 | * Copyright (c) 2016 Alexandrov Stanislav <neko@nya.ai> |
---|
7 | | - * |
---|
8 | | - * This program is free software; you can redistribute it and/or modify it |
---|
9 | | - * under the terms of the GNU General Public License as published by the Free |
---|
10 | | - * Software Foundation; either version 2 of the License, or (at your option) |
---|
11 | | - * any later version. |
---|
12 | 8 | */ |
---|
13 | 9 | |
---|
14 | 10 | #include <linux/hid.h> |
---|
.. | .. |
---|
192 | 188 | ret = input_mt_init_slots(input, ELAN_MAX_FINGERS, INPUT_MT_POINTER); |
---|
193 | 189 | if (ret) { |
---|
194 | 190 | hid_err(hdev, "Failed to init elan MT slots: %d\n", ret); |
---|
195 | | - input_free_device(input); |
---|
196 | 191 | return ret; |
---|
197 | 192 | } |
---|
198 | 193 | |
---|
.. | .. |
---|
204 | 199 | hid_err(hdev, "Failed to register elan input device: %d\n", |
---|
205 | 200 | ret); |
---|
206 | 201 | input_mt_destroy_slots(input); |
---|
207 | | - input_free_device(input); |
---|
208 | 202 | return ret; |
---|
209 | 203 | } |
---|
210 | 204 | |
---|
.. | .. |
---|
395 | 389 | * This byte sequence will enable multitouch mode and disable |
---|
396 | 390 | * mouse emulation |
---|
397 | 391 | */ |
---|
398 | | - const unsigned char buf[] = { 0x0D, 0x00, 0x03, 0x21, 0x00 }; |
---|
| 392 | + static const unsigned char buf[] = { 0x0D, 0x00, 0x03, 0x21, 0x00 }; |
---|
399 | 393 | unsigned char *dmabuf = kmemdup(buf, sizeof(buf), GFP_KERNEL); |
---|
400 | 394 | |
---|
401 | 395 | if (!dmabuf) |
---|
.. | .. |
---|
499 | 493 | return 0; |
---|
500 | 494 | |
---|
501 | 495 | if (!drvdata->input) { |
---|
502 | | - hid_err(hdev, "Input device is not registred\n"); |
---|
| 496 | + hid_err(hdev, "Input device is not registered\n"); |
---|
503 | 497 | ret = -ENAVAIL; |
---|
504 | 498 | goto err; |
---|
505 | 499 | } |
---|