Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input

Pull input fixes from Dmitry Torokhov:

- a quirk to i8042 to ignore timeout bit on Lifebook AH544

- a fixup to Synaptics RMI function 54 that was breaking some Dells

- a fix for memory leak in soc_button_array driver

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input:
Input: synaptics-rmi4 - only read the F54 query registers which are used
Input: i8042 - add Fujitsu Lifebook AH544 to notimeout list
Input: soc_button_array - fix leaking the ACPI button descriptor buffer

+28 -16
+14 -6
drivers/input/misc/soc_button_array.c
··· 248 248 249 249 if (!btns_desc) { 250 250 dev_err(dev, "ACPI Button Descriptors not found\n"); 251 - return ERR_PTR(-ENODEV); 251 + button_info = ERR_PTR(-ENODEV); 252 + goto out; 252 253 } 253 254 254 255 /* The first package describes the collection */ ··· 265 264 } 266 265 if (collection_uid == -1) { 267 266 dev_err(dev, "Invalid Button Collection Descriptor\n"); 268 - return ERR_PTR(-ENODEV); 267 + button_info = ERR_PTR(-ENODEV); 268 + goto out; 269 269 } 270 270 271 271 /* There are package.count - 1 buttons + 1 terminating empty entry */ 272 272 button_info = devm_kcalloc(dev, btns_desc->package.count, 273 273 sizeof(*button_info), GFP_KERNEL); 274 - if (!button_info) 275 - return ERR_PTR(-ENOMEM); 274 + if (!button_info) { 275 + button_info = ERR_PTR(-ENOMEM); 276 + goto out; 277 + } 276 278 277 279 /* Parse the button descriptors */ 278 280 for (i = 1, btn = 0; i < btns_desc->package.count; i++, btn++) { 279 281 if (soc_button_parse_btn_desc(dev, 280 282 &btns_desc->package.elements[i], 281 283 collection_uid, 282 - &button_info[btn])) 283 - return ERR_PTR(-ENODEV); 284 + &button_info[btn])) { 285 + button_info = ERR_PTR(-ENODEV); 286 + goto out; 287 + } 284 288 } 285 289 290 + out: 291 + kfree(buf.pointer); 286 292 return button_info; 287 293 } 288 294
+7 -10
drivers/input/rmi4/rmi_f54.c
··· 31 31 #define F54_GET_REPORT 1 32 32 #define F54_FORCE_CAL 2 33 33 34 - /* Fixed sizes of reports */ 35 - #define F54_QUERY_LEN 27 36 - 37 34 /* F54 capabilities */ 38 35 #define F54_CAP_BASELINE (1 << 2) 39 36 #define F54_CAP_IMAGE8 (1 << 3) ··· 92 95 struct f54_data { 93 96 struct rmi_function *fn; 94 97 95 - u8 qry[F54_QUERY_LEN]; 96 98 u8 num_rx_electrodes; 97 99 u8 num_tx_electrodes; 98 100 u8 capabilities; ··· 628 632 { 629 633 int error; 630 634 struct f54_data *f54; 635 + u8 buf[6]; 631 636 632 637 f54 = dev_get_drvdata(&fn->dev); 633 638 634 639 error = rmi_read_block(fn->rmi_dev, fn->fd.query_base_addr, 635 - &f54->qry, sizeof(f54->qry)); 640 + buf, sizeof(buf)); 636 641 if (error) { 637 642 dev_err(&fn->dev, "%s: Failed to query F54 properties\n", 638 643 __func__); 639 644 return error; 640 645 } 641 646 642 - f54->num_rx_electrodes = f54->qry[0]; 643 - f54->num_tx_electrodes = f54->qry[1]; 644 - f54->capabilities = f54->qry[2]; 645 - f54->clock_rate = f54->qry[3] | (f54->qry[4] << 8); 646 - f54->family = f54->qry[5]; 647 + f54->num_rx_electrodes = buf[0]; 648 + f54->num_tx_electrodes = buf[1]; 649 + f54->capabilities = buf[2]; 650 + f54->clock_rate = buf[3] | (buf[4] << 8); 651 + f54->family = buf[5]; 647 652 648 653 rmi_dbg(RMI_DEBUG_FN, &fn->dev, "F54 num_rx_electrodes: %d\n", 649 654 f54->num_rx_electrodes);
+7
drivers/input/serio/i8042-x86ia64io.h
··· 723 723 DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK U574"), 724 724 }, 725 725 }, 726 + { 727 + /* Fujitsu UH554 laptop */ 728 + .matches = { 729 + DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"), 730 + DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK UH544"), 731 + }, 732 + }, 726 733 { } 727 734 }; 728 735