Skip to content

Commit 2bbe17a

Browse files
committed
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid
Pull HID fixes from Jiri Kosina: - memory leak fix for Wacom driver (Ping Cheng) - various trivial small fixes, cleanups and device ID additions * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hid/hid: HID: logitech-hidpp: Add product ID for MX Ergo in Bluetooth mode HID: Ignore battery for Elan touchscreen on ASUS UX550 HID: logitech-dj: add the G602 receiver HID: wiimote: remove h from printk format specifier HID: uclogic: remove h from printk format specifier HID: sony: select CONFIG_CRC32 HID: sfh: fix address space confusion HID: multitouch: Enable multi-input for Synaptics pointstick/touchpad device HID: wacom: Fix memory leakage caused by kfifo_alloc
2 parents 65f0d24 + 7de843d commit 2bbe17a

File tree

13 files changed

+55
-12
lines changed

13 files changed

+55
-12
lines changed

drivers/hid/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -899,6 +899,7 @@ config HID_SONY
899899
depends on NEW_LEDS
900900
depends on LEDS_CLASS
901901
select POWER_SUPPLY
902+
select CRC32
902903
help
903904
Support for
904905

drivers/hid/amd-sfh-hid/amd_sfh_client.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ int amd_sfh_hid_client_init(struct amd_mp2_dev *privdata)
154154

155155
for (i = 0; i < cl_data->num_hid_devices; i++) {
156156
cl_data->sensor_virt_addr[i] = dma_alloc_coherent(dev, sizeof(int) * 8,
157-
&cl_data->sensor_phys_addr[i],
157+
&cl_data->sensor_dma_addr[i],
158158
GFP_KERNEL);
159159
cl_data->sensor_sts[i] = 0;
160160
cl_data->sensor_requested_cnt[i] = 0;
@@ -187,7 +187,7 @@ int amd_sfh_hid_client_init(struct amd_mp2_dev *privdata)
187187
}
188188
info.period = msecs_to_jiffies(AMD_SFH_IDLE_LOOP);
189189
info.sensor_idx = cl_idx;
190-
info.phys_address = cl_data->sensor_phys_addr[i];
190+
info.dma_address = cl_data->sensor_dma_addr[i];
191191

192192
cl_data->report_descr[i] = kzalloc(cl_data->report_descr_sz[i], GFP_KERNEL);
193193
if (!cl_data->report_descr[i]) {
@@ -212,7 +212,7 @@ int amd_sfh_hid_client_init(struct amd_mp2_dev *privdata)
212212
if (cl_data->sensor_virt_addr[i]) {
213213
dma_free_coherent(&privdata->pdev->dev, 8 * sizeof(int),
214214
cl_data->sensor_virt_addr[i],
215-
cl_data->sensor_phys_addr[i]);
215+
cl_data->sensor_dma_addr[i]);
216216
}
217217
kfree(cl_data->feature_report[i]);
218218
kfree(cl_data->input_report[i]);
@@ -238,7 +238,7 @@ int amd_sfh_hid_client_deinit(struct amd_mp2_dev *privdata)
238238
if (cl_data->sensor_virt_addr[i]) {
239239
dma_free_coherent(&privdata->pdev->dev, 8 * sizeof(int),
240240
cl_data->sensor_virt_addr[i],
241-
cl_data->sensor_phys_addr[i]);
241+
cl_data->sensor_dma_addr[i]);
242242
}
243243
}
244244
kfree(cl_data);

drivers/hid/amd-sfh-hid/amd_sfh_hid.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ struct amdtp_cl_data {
2727
int hid_descr_size[MAX_HID_DEVICES];
2828
phys_addr_t phys_addr_base;
2929
u32 *sensor_virt_addr[MAX_HID_DEVICES];
30-
phys_addr_t sensor_phys_addr[MAX_HID_DEVICES];
30+
dma_addr_t sensor_dma_addr[MAX_HID_DEVICES];
3131
u32 sensor_sts[MAX_HID_DEVICES];
3232
u32 sensor_requested_cnt[MAX_HID_DEVICES];
3333
u8 report_type[MAX_HID_DEVICES];

drivers/hid/amd-sfh-hid/amd_sfh_pcie.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ void amd_start_sensor(struct amd_mp2_dev *privdata, struct amd_mp2_sensor_info i
4141
cmd_param.s.buf_layout = 1;
4242
cmd_param.s.buf_length = 16;
4343

44-
writeq(info.phys_address, privdata->mmio + AMD_C2P_MSG2);
44+
writeq(info.dma_address, privdata->mmio + AMD_C2P_MSG2);
4545
writel(cmd_param.ul, privdata->mmio + AMD_C2P_MSG1);
4646
writel(cmd_base.ul, privdata->mmio + AMD_C2P_MSG0);
4747
}

drivers/hid/amd-sfh-hid/amd_sfh_pcie.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ struct amd_mp2_dev {
6767
struct amd_mp2_sensor_info {
6868
u8 sensor_idx;
6969
u32 period;
70-
phys_addr_t phys_address;
70+
dma_addr_t dma_address;
7171
};
7272

7373
void amd_start_sensor(struct amd_mp2_dev *privdata, struct amd_mp2_sensor_info info);

drivers/hid/hid-ids.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -389,6 +389,7 @@
389389
#define USB_DEVICE_ID_TOSHIBA_CLICK_L9W 0x0401
390390
#define USB_DEVICE_ID_HP_X2 0x074d
391391
#define USB_DEVICE_ID_HP_X2_10_COVER 0x0755
392+
#define USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN 0x2706
392393

393394
#define USB_VENDOR_ID_ELECOM 0x056e
394395
#define USB_DEVICE_ID_ELECOM_BM084 0x0061

drivers/hid/hid-input.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,6 +322,8 @@ static const struct hid_device_id hid_battery_quirks[] = {
322322
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH,
323323
USB_DEVICE_ID_LOGITECH_DINOVO_EDGE_KBD),
324324
HID_BATTERY_QUIRK_IGNORE },
325+
{ HID_USB_DEVICE(USB_VENDOR_ID_ELAN, USB_DEVICE_ID_ASUS_UX550_TOUCHSCREEN),
326+
HID_BATTERY_QUIRK_IGNORE },
325327
{}
326328
};
327329

drivers/hid/hid-logitech-dj.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1869,6 +1869,10 @@ static const struct hid_device_id logi_dj_receivers[] = {
18691869
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
18701870
0xc531),
18711871
.driver_data = recvr_type_gaming_hidpp},
1872+
{ /* Logitech G602 receiver (0xc537) */
1873+
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
1874+
0xc537),
1875+
.driver_data = recvr_type_gaming_hidpp},
18721876
{ /* Logitech lightspeed receiver (0xc539) */
18731877
HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH,
18741878
USB_DEVICE_ID_LOGITECH_NANO_RECEIVER_LIGHTSPEED_1),

drivers/hid/hid-logitech-hidpp.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4053,6 +4053,8 @@ static const struct hid_device_id hidpp_devices[] = {
40534053
{ /* MX Master mouse over Bluetooth */
40544054
HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb012),
40554055
.driver_data = HIDPP_QUIRK_HI_RES_SCROLL_X2121 },
4056+
{ /* MX Ergo trackball over Bluetooth */
4057+
HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb01d) },
40564058
{ HID_BLUETOOTH_DEVICE(USB_VENDOR_ID_LOGITECH, 0xb01e),
40574059
.driver_data = HIDPP_QUIRK_HI_RES_SCROLL_X2121 },
40584060
{ /* MX Master 3 mouse over Bluetooth */

drivers/hid/hid-multitouch.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2054,6 +2054,10 @@ static const struct hid_device_id mt_devices[] = {
20542054
HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
20552055
USB_VENDOR_ID_SYNAPTICS, 0xce08) },
20562056

2057+
{ .driver_data = MT_CLS_WIN_8_FORCE_MULTI_INPUT,
2058+
HID_DEVICE(BUS_I2C, HID_GROUP_MULTITOUCH_WIN_8,
2059+
USB_VENDOR_ID_SYNAPTICS, 0xce09) },
2060+
20572061
/* TopSeed panels */
20582062
{ .driver_data = MT_CLS_TOPSEED,
20592063
MT_USB_DEVICE(USB_VENDOR_ID_TOPSEED2,

0 commit comments

Comments
 (0)