From patchwork Wed Jun 12 23:58:03 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nathan Huckleberry X-Patchwork-Id: 10993109 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 702CD14DB for ; Thu, 13 Jun 2019 17:00:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5C64E205FC for ; Thu, 13 Jun 2019 17:00:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 50E1D212DB; Thu, 13 Jun 2019 17:00:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-15.5 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI, USER_IN_DEF_DKIM_WL autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3625205FC for ; Thu, 13 Jun 2019 17:00:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729765AbfFMRAk (ORCPT ); Thu, 13 Jun 2019 13:00:40 -0400 Received: from mail-yw1-f73.google.com ([209.85.161.73]:36162 "EHLO mail-yw1-f73.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729762AbfFLX6i (ORCPT ); Wed, 12 Jun 2019 19:58:38 -0400 Received: by mail-yw1-f73.google.com with SMTP id 75so13156115ywb.3 for ; Wed, 12 Jun 2019 16:58:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:message-id:mime-version:subject:from:to:cc; bh=yYB71N56/U5nJhQbhNUWbENgcXZCI0bW+Vplj/QJV3Y=; b=L3D5qSk4yCBQXeK/aFvbSB+ZGxQIQCLKbFQsu6tl+wobBVotYYEFmur7xqd90bDCY0 uNua69ri9O+S2ZhjuTLsl+MrQk57rb3p+A0xVJ+vBxpzuJ5+QpK8HygJlfYWZBRQkw1z EzJpZHnCzFew6rWCaX15Jqgdzt+eY5ydSMqlzHikdcjf4wxmQ0w+BbkF0H6MaGwK+ivx GUaoeTz+1ZcN+rzM4Ega0Qr+Nc6IljLoVtLtHO3RGHvD3wEzd6nRUtcQfGk/MjLjhBWl boh65s934voespHQ47oIGTcIP4aKIdfbhX45vlXoRUKcVL+ThwxznHxtQ0HkAlQ4SVoB OpXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:message-id:mime-version:subject:from:to:cc; bh=yYB71N56/U5nJhQbhNUWbENgcXZCI0bW+Vplj/QJV3Y=; b=IQm22QM0AaQ61+zy3DNz0p54Ff0jglpj9AJ+bBOpy1aab63OeSgd1bFkDqvzZnbNbc 8rC30PJR57xshCe+XltI9exUi0TRC5OLFVjOHPy6CnU0uPEvsGHJvOz7NXPUqdDBg++7 MnqhG3aJWdZ32aCY3NxJ6H2iVgwb/Yog/7ZFeG+wlW8djHaj+49zCWg0Wjaoy3tSQWGf +bVrLWZN1CtPTPFuaRIhTG+VB6FcZr1LNVQBPTwPQT3eBOJK1tMDEXA4W1FI/Bniw0kl dUc4p5iYsWRaUqNFOaPKrkSJeyoPw/PlhKVSJHFIeEkmt+Fb/1mQaFCEYwGdMM16aPGC jdKQ== X-Gm-Message-State: APjAAAUROWjgfhoWy0nLvNl7mqQp9NkOMfXEhfdUwrtos7i5hQAWQShg l71+aFDGYUqUI/RRdvvFVUkEgFm0tg== X-Google-Smtp-Source: APXvYqxQsIAuwUkeEw6dmQi8jxqyLd0soq95WIuFqa6rF1GfYqz3bp/GztaqYMzknAo0AiUfAiokSpIVuA== X-Received: by 2002:a81:6ad5:: with SMTP id f204mr25535319ywc.108.1560383917681; Wed, 12 Jun 2019 16:58:37 -0700 (PDT) Date: Wed, 12 Jun 2019 16:58:03 -0700 Message-Id: <20190612235803.9290-1-nhuck@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.22.0.rc2.383.gf4fbbf30c2-goog Subject: [PATCH] Input: atmel_mxt_ts - fix -Wunused-const-variable From: Nathan Huckleberry To: nick@shmanahar.org, dmitry.torokhov@gmail.com Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org, Nathan Huckleberry , clang-built-linux@googlegroups.com Sender: linux-input-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Clang produces the following warning drivers/input/touchscreen/atmel_mxt_ts.c:259:42: warning: unused variable 'mxt_video_fops' [-Wunused-const-variable] static const struct v4l2_file_operations mxt_video_fops = { Since mxt_video_fops is only used inside an ifdef. It should be moved inside the ifdef. Cc: clang-built-linux@googlegroups.com Link: https://github.com/ClangBuiltLinux/linux/issues/527 Signed-off-by: Nathan Huckleberry --- drivers/input/touchscreen/atmel_mxt_ts.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 19378f200c63..48411c83320b 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -256,6 +256,7 @@ enum v4l_dbg_inputs { MXT_V4L_INPUT_MAX, }; +#ifdef CONFIG_TOUCHSCREEN_ATMEL_MXT_T37 static const struct v4l2_file_operations mxt_video_fops = { .owner = THIS_MODULE, .open = v4l2_fh_open, @@ -265,6 +266,7 @@ static const struct v4l2_file_operations mxt_video_fops = { .mmap = vb2_fop_mmap, .poll = vb2_fop_poll, }; +#endif enum mxt_suspend_mode { MXT_SUSPEND_DEEP_SLEEP = 0,