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
This commit is contained in:
commit
412572bffa
|
@ -248,7 +248,8 @@ static struct soc_button_info *soc_button_get_button_info(struct device *dev)
|
|||
|
||||
if (!btns_desc) {
|
||||
dev_err(dev, "ACPI Button Descriptors not found\n");
|
||||
return ERR_PTR(-ENODEV);
|
||||
button_info = ERR_PTR(-ENODEV);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* The first package describes the collection */
|
||||
|
@ -264,24 +265,31 @@ static struct soc_button_info *soc_button_get_button_info(struct device *dev)
|
|||
}
|
||||
if (collection_uid == -1) {
|
||||
dev_err(dev, "Invalid Button Collection Descriptor\n");
|
||||
return ERR_PTR(-ENODEV);
|
||||
button_info = ERR_PTR(-ENODEV);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* There are package.count - 1 buttons + 1 terminating empty entry */
|
||||
button_info = devm_kcalloc(dev, btns_desc->package.count,
|
||||
sizeof(*button_info), GFP_KERNEL);
|
||||
if (!button_info)
|
||||
return ERR_PTR(-ENOMEM);
|
||||
if (!button_info) {
|
||||
button_info = ERR_PTR(-ENOMEM);
|
||||
goto out;
|
||||
}
|
||||
|
||||
/* Parse the button descriptors */
|
||||
for (i = 1, btn = 0; i < btns_desc->package.count; i++, btn++) {
|
||||
if (soc_button_parse_btn_desc(dev,
|
||||
&btns_desc->package.elements[i],
|
||||
collection_uid,
|
||||
&button_info[btn]))
|
||||
return ERR_PTR(-ENODEV);
|
||||
&button_info[btn])) {
|
||||
button_info = ERR_PTR(-ENODEV);
|
||||
goto out;
|
||||
}
|
||||
}
|
||||
|
||||
out:
|
||||
kfree(buf.pointer);
|
||||
return button_info;
|
||||
}
|
||||
|
||||
|
|
|
@ -31,9 +31,6 @@
|
|||
#define F54_GET_REPORT 1
|
||||
#define F54_FORCE_CAL 2
|
||||
|
||||
/* Fixed sizes of reports */
|
||||
#define F54_QUERY_LEN 27
|
||||
|
||||
/* F54 capabilities */
|
||||
#define F54_CAP_BASELINE (1 << 2)
|
||||
#define F54_CAP_IMAGE8 (1 << 3)
|
||||
|
@ -95,7 +92,6 @@ struct rmi_f54_reports {
|
|||
struct f54_data {
|
||||
struct rmi_function *fn;
|
||||
|
||||
u8 qry[F54_QUERY_LEN];
|
||||
u8 num_rx_electrodes;
|
||||
u8 num_tx_electrodes;
|
||||
u8 capabilities;
|
||||
|
@ -632,22 +628,23 @@ static int rmi_f54_detect(struct rmi_function *fn)
|
|||
{
|
||||
int error;
|
||||
struct f54_data *f54;
|
||||
u8 buf[6];
|
||||
|
||||
f54 = dev_get_drvdata(&fn->dev);
|
||||
|
||||
error = rmi_read_block(fn->rmi_dev, fn->fd.query_base_addr,
|
||||
&f54->qry, sizeof(f54->qry));
|
||||
buf, sizeof(buf));
|
||||
if (error) {
|
||||
dev_err(&fn->dev, "%s: Failed to query F54 properties\n",
|
||||
__func__);
|
||||
return error;
|
||||
}
|
||||
|
||||
f54->num_rx_electrodes = f54->qry[0];
|
||||
f54->num_tx_electrodes = f54->qry[1];
|
||||
f54->capabilities = f54->qry[2];
|
||||
f54->clock_rate = f54->qry[3] | (f54->qry[4] << 8);
|
||||
f54->family = f54->qry[5];
|
||||
f54->num_rx_electrodes = buf[0];
|
||||
f54->num_tx_electrodes = buf[1];
|
||||
f54->capabilities = buf[2];
|
||||
f54->clock_rate = buf[3] | (buf[4] << 8);
|
||||
f54->family = buf[5];
|
||||
|
||||
rmi_dbg(RMI_DEBUG_FN, &fn->dev, "F54 num_rx_electrodes: %d\n",
|
||||
f54->num_rx_electrodes);
|
||||
|
|
|
@ -723,6 +723,13 @@ static const struct dmi_system_id __initconst i8042_dmi_notimeout_table[] = {
|
|||
DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK U574"),
|
||||
},
|
||||
},
|
||||
{
|
||||
/* Fujitsu UH554 laptop */
|
||||
.matches = {
|
||||
DMI_MATCH(DMI_SYS_VENDOR, "FUJITSU"),
|
||||
DMI_MATCH(DMI_PRODUCT_NAME, "LIFEBOOK UH544"),
|
||||
},
|
||||
},
|
||||
{ }
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue