From patchwork Wed Aug 26 18:19:31 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benson Leung X-Patchwork-Id: 7079221 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 02E529F372 for ; Wed, 26 Aug 2015 18:19:53 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 1E11820957 for ; Wed, 26 Aug 2015 18:19:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id BDE8A20953 for ; Wed, 26 Aug 2015 18:19:50 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753034AbbHZSTt (ORCPT ); Wed, 26 Aug 2015 14:19:49 -0400 Received: from mail-pa0-f43.google.com ([209.85.220.43]:36316 "EHLO mail-pa0-f43.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752306AbbHZSTs (ORCPT ); Wed, 26 Aug 2015 14:19:48 -0400 Received: by pacgr6 with SMTP id gr6so16383675pac.3 for ; Wed, 26 Aug 2015 11:19:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id; bh=ZdFWuEcRvWQKWkpoEVJGuyg0Svv3ymfswqM0RkjWHgk=; b=QrY4WjoMe7n4n9tVhjf5JTvQzF3BPHpm0scb53cuav9kS9V8uiIx57XIs/uAFnKpsW hojvh8fGxRJ9dgWjGKDGEfXTTcUVY/4cl9jRtqnerSvuT3O4DjajZ+Fs8S5q5X86NXJy Pa4v1MpqPs9tKOBYulcMwTuU25TCZ5ukuMCQQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=ZdFWuEcRvWQKWkpoEVJGuyg0Svv3ymfswqM0RkjWHgk=; b=VoUmsNnrOcUvnuUAj+c26Tsq2bGTq3tPQ4p8ij1zpgviQViIJJ+E3OrdHVtW/xV06E 3DN9uSEIXs4M7lnOnoefAUEnF55XYOCU3jJ3rrXyaiYeBpo5uyMZHNwph9dbKo3OESzM tLFbWfSx4CDHsLnSsoUGFbVUSJKETdvbjoeJJlZatmHphDutyPcUlL6YgvgW5Eaw4A79 8+iwmayMpDX/KJ5othbx3DrEqIJAcwzdZfYPHYjv02FVsoeb67DzMuR6ovp4GNMJrtys M2yhKGTBCU06uatESHpLH2ChDOIEUYHBgAUx3EpFtXYmOfQOMi4JwLP/DvrjzrrA1IAZ Ai8A== X-Gm-Message-State: ALoCoQlpIk/bPMTcxcLhVv/3JOtuZp03AtLLN3stauLvk86VqR2qNNBHbciPJA3TPb6kFNY703no X-Received: by 10.67.8.106 with SMTP id dj10mr61856670pad.123.1440613188391; Wed, 26 Aug 2015 11:19:48 -0700 (PDT) Received: from laughingman.mtv.corp.google.com ([172.22.65.61]) by smtp.gmail.com with ESMTPSA id e6sm25586692pas.35.2015.08.26.11.19.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 26 Aug 2015 11:19:47 -0700 (PDT) From: Benson Leung To: dmitry.torokhov@gmail.com, dusonlin@emc.com.tw, michele.curti@gmail.com Cc: bleung@chromium.org, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Input: elan_i2c - Fix typos for validpage_count Date: Wed, 26 Aug 2015 11:19:31 -0700 Message-Id: <1440613171-20549-1-git-send-email-bleung@chromium.org> X-Mailer: git-send-email 2.5.0.457.gab17608 Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-8.2 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Search for "vaildpage_count" and replace with "validpage_count". Signed-off-by: Benson Leung --- drivers/input/mouse/elan_i2c_core.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c index bbdaedc..d4a38ca 100644 --- a/drivers/input/mouse/elan_i2c_core.c +++ b/drivers/input/mouse/elan_i2c_core.c @@ -84,7 +84,7 @@ struct elan_tp_data { int pressure_adjustment; u8 mode; u8 ic_type; - u16 fw_vaildpage_count; + u16 fw_validpage_count; u16 fw_signature_address; bool irq_wake; @@ -94,28 +94,28 @@ struct elan_tp_data { 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) { switch(ic_type) { case 0x08: - *vaildpage_count = 512; + *validpage_count = 512; break; case 0x09: - *vaildpage_count = 768; + *validpage_count = 768; break; case 0x0D: - *vaildpage_count = 896; + *validpage_count = 896; break; default: /* unknown ic type clear value */ - *vaildpage_count = 0; + *validpage_count = 0; *signature_address = 0; return -ENXIO; } *signature_address = - (*vaildpage_count * ETP_FW_PAGE_SIZE) - ETP_FW_SIGNATURE_SIZE; + (*validpage_count * ETP_FW_PAGE_SIZE) - ETP_FW_SIGNATURE_SIZE; return 0; } @@ -264,7 +264,7 @@ static int elan_query_device_info(struct elan_tp_data *data) if (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); if (error) { 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]); 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; const u8 *page = &fw->data[i * ETP_FW_PAGE_SIZE];