mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-13 00:29:50 +00:00
Input: elan_i2c - fix typos for validpage_count
Search for "vaildpage_count" and replace with "validpage_count". Signed-off-by: Benson Leung <bleung@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
This commit is contained in:
parent
66bc2f51ef
commit
742f452b9b
@ -84,7 +84,7 @@ struct elan_tp_data {
|
|||||||
int pressure_adjustment;
|
int pressure_adjustment;
|
||||||
u8 mode;
|
u8 mode;
|
||||||
u8 ic_type;
|
u8 ic_type;
|
||||||
u16 fw_vaildpage_count;
|
u16 fw_validpage_count;
|
||||||
u16 fw_signature_address;
|
u16 fw_signature_address;
|
||||||
|
|
||||||
bool irq_wake;
|
bool irq_wake;
|
||||||
@ -94,28 +94,28 @@ struct elan_tp_data {
|
|||||||
bool baseline_ready;
|
bool baseline_ready;
|
||||||
};
|
};
|
||||||
|
|
||||||
static int elan_get_fwinfo(u8 ic_type, u16 *vaildpage_count,
|
static int elan_get_fwinfo(u8 ic_type, u16 *validpage_count,
|
||||||
u16 *signature_address)
|
u16 *signature_address)
|
||||||
{
|
{
|
||||||
switch(ic_type) {
|
switch(ic_type) {
|
||||||
case 0x08:
|
case 0x08:
|
||||||
*vaildpage_count = 512;
|
*validpage_count = 512;
|
||||||
break;
|
break;
|
||||||
case 0x09:
|
case 0x09:
|
||||||
*vaildpage_count = 768;
|
*validpage_count = 768;
|
||||||
break;
|
break;
|
||||||
case 0x0D:
|
case 0x0D:
|
||||||
*vaildpage_count = 896;
|
*validpage_count = 896;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* unknown ic type clear value */
|
/* unknown ic type clear value */
|
||||||
*vaildpage_count = 0;
|
*validpage_count = 0;
|
||||||
*signature_address = 0;
|
*signature_address = 0;
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
*signature_address =
|
*signature_address =
|
||||||
(*vaildpage_count * ETP_FW_PAGE_SIZE) - ETP_FW_SIGNATURE_SIZE;
|
(*validpage_count * ETP_FW_PAGE_SIZE) - ETP_FW_SIGNATURE_SIZE;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
@ -264,7 +264,7 @@ static int elan_query_device_info(struct elan_tp_data *data)
|
|||||||
if (error)
|
if (error)
|
||||||
return error;
|
return error;
|
||||||
|
|
||||||
error = elan_get_fwinfo(data->ic_type, &data->fw_vaildpage_count,
|
error = elan_get_fwinfo(data->ic_type, &data->fw_validpage_count,
|
||||||
&data->fw_signature_address);
|
&data->fw_signature_address);
|
||||||
if (error) {
|
if (error) {
|
||||||
dev_err(&data->client->dev,
|
dev_err(&data->client->dev,
|
||||||
@ -356,7 +356,7 @@ static int __elan_update_firmware(struct elan_tp_data *data,
|
|||||||
iap_start_addr = get_unaligned_le16(&fw->data[ETP_IAP_START_ADDR * 2]);
|
iap_start_addr = get_unaligned_le16(&fw->data[ETP_IAP_START_ADDR * 2]);
|
||||||
|
|
||||||
boot_page_count = (iap_start_addr * 2) / ETP_FW_PAGE_SIZE;
|
boot_page_count = (iap_start_addr * 2) / ETP_FW_PAGE_SIZE;
|
||||||
for (i = boot_page_count; i < data->fw_vaildpage_count; i++) {
|
for (i = boot_page_count; i < data->fw_validpage_count; i++) {
|
||||||
u16 checksum = 0;
|
u16 checksum = 0;
|
||||||
const u8 *page = &fw->data[i * ETP_FW_PAGE_SIZE];
|
const u8 *page = &fw->data[i * ETP_FW_PAGE_SIZE];
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user