From patchwork Tue Sep 16 20:51:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rasmus Villemoes X-Patchwork-Id: 4920381 Return-Path: X-Original-To: patchwork-linux-input@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9702DBEEA6 for ; Tue, 16 Sep 2014 20:55:04 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A489D2015D for ; Tue, 16 Sep 2014 20:55:03 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AFED3201CE for ; Tue, 16 Sep 2014 20:55:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755618AbaIPUy5 (ORCPT ); Tue, 16 Sep 2014 16:54:57 -0400 Received: from mail-lb0-f173.google.com ([209.85.217.173]:50734 "EHLO mail-lb0-f173.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755403AbaIPUwQ (ORCPT ); Tue, 16 Sep 2014 16:52:16 -0400 Received: by mail-lb0-f173.google.com with SMTP id w7so591946lbi.32 for ; Tue, 16 Sep 2014 13:52:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=rasmusvillemoes.dk; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=5+IZQwsudWzDeIgArEU3r9DTKDDH+xGiYtY36QXA72M=; b=ShFYs43dvGLCCatqHIvpdv88SVnFHg6VNfCe9BOmaCFiH1zI/skeAfseiUoqXjT3eA s6rT0lPXKII71nKkHV+u758P+HUEJYVzgA6P+jIw3F1WnEeE5SiFtbcv5l2zd/wCpvr+ JBrDWr5cm3a+wv+3ftgmItAewFiKWpGCySRf8= 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:in-reply-to :references; bh=5+IZQwsudWzDeIgArEU3r9DTKDDH+xGiYtY36QXA72M=; b=QrJgpDOtFkK4dUVnAtTgOnc4F+cEg2oM/19yU5HRdiWufOEp4ZN/ySzMrD9yDTLTGu S+fLoMbFpURory1tN/BQdq1EA3XVSdy6RpasLNhGTD2BFUUUONwTaLl8hEDvyO1eTD9R Zh8USOa84/CB90TKjowkVxt8nAyyexWWh71Hs8JFlqLInQjHlq16cRycZBqlHzuFpEUd 6uwUrbQDDchaDQIKFYlU16w+FbOa2pUT4Gb2I6vpURI8kWzEW18lEis2nL//NowtM5mj 3zViKlDMWAY8hZkqKrCBLJj2iPVxusnrFJ1+7AS+mOd/OewR61KrFw5aetiJcyv+StaN xZ4Q== X-Gm-Message-State: ALoCoQmvJkyYyTKII4WUV+8m8PcA0XO/GoB/m7PUs/wy9TMdzVHqQRJRmdwswY4Vzw4ka7f8DGt+ X-Received: by 10.112.219.71 with SMTP id pm7mr37280857lbc.3.1410900734947; Tue, 16 Sep 2014 13:52:14 -0700 (PDT) Received: from spencer.imf.au.dk ([130.225.20.51]) by mx.google.com with ESMTPSA id nb7sm5514091lbb.43.2014.09.16.13.52.13 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 16 Sep 2014 13:52:14 -0700 (PDT) From: Rasmus Villemoes To: Andrew Morton Cc: linux-kernel@vger.kernel.org, Rasmus Villemoes , Dmitry Torokhov , linux-input@vger.kernel.org Subject: [PATCH 15/22] Input: edt-ft5x06 - Replace strnicmp with strncasecmp Date: Tue, 16 Sep 2014 22:51:29 +0200 Message-Id: <1410900696-6481-16-git-send-email-linux@rasmusvillemoes.dk> X-Mailer: git-send-email 2.0.4 In-Reply-To: <1410900696-6481-1-git-send-email-linux@rasmusvillemoes.dk> References: <1410900696-6481-1-git-send-email-linux@rasmusvillemoes.dk> Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Spam-Status: No, score=-7.4 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 The kernel used to contain two functions for length-delimited, case-insensitive string comparison, strnicmp with correct semantics and a slightly buggy strncasecmp. The latter is the POSIX name, so strnicmp was renamed to strncasecmp, and strnicmp made into a wrapper for the new strncasecmp to avoid breaking existing users. To allow the compat wrapper strnicmp to be removed at some point in the future, and to avoid the extra indirection cost, do s/strnicmp/strncasecmp/g. Cc: Dmitry Torokhov Cc: linux-input@vger.kernel.org Signed-off-by: Rasmus Villemoes --- drivers/input/touchscreen/edt-ft5x06.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index 8857d5b..ee3434f 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -812,7 +812,7 @@ static int edt_ft5x06_ts_identify(struct i2c_client *client, /* if we find something consistent, stay with that assumption * at least M09 won't send 3 bytes here */ - if (!(strnicmp(rdbuf + 1, "EP0", 3))) { + if (!(strncasecmp(rdbuf + 1, "EP0", 3))) { tsdata->version = M06; /* remove last '$' end marker */