From patchwork Fri Sep 30 16:22:33 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9358627 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 157916075E for ; Fri, 30 Sep 2016 16:24:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 06F132A0D3 for ; Fri, 30 Sep 2016 16:24:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EF7A32A0E1; Fri, 30 Sep 2016 16:24:01 +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=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM 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 B5F492A0DC for ; Fri, 30 Sep 2016 16:23:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934027AbcI3QXw (ORCPT ); Fri, 30 Sep 2016 12:23:52 -0400 Received: from mout.kundenserver.de ([217.72.192.73]:64440 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933082AbcI3QXt (ORCPT ); Fri, 30 Sep 2016 12:23:49 -0400 Received: from wuerfel.lan. ([78.43.20.153]) by mrelayeu.kundenserver.de (mreue101) with ESMTPA (Nemesis) id 0MfHVi-1ba7e127sw-00OlcF; Fri, 30 Sep 2016 18:23:35 +0200 From: Arnd Bergmann To: Dmitry Torokhov Cc: Arnd Bergmann , Hans de Goede , Siebren Vroegindeweij , Rob Herring , Michel Verlaan , linux-input@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] Input: eKTF2127: mark PM functions as __maybe_unused Date: Fri, 30 Sep 2016 18:22:33 +0200 Message-Id: <20160930162329.183073-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:v44SUNDjLBJaDZmWxPocLq8rx+1PuvwYfVLpCLu+APVD2idFyEy o2Is5x4pULKLuGKXtXR7aDOtz16uLWZfzxG74/1+EXcu1CEx8O82CxnxhgbJFHM4XUUGFXe naxWCS/IpWJwIaRp2xOX2k0zb6+ONhTp/YWreT8G4UopT0neWFAXZrvGHN/sIke1cICeAnd q6Ea6JX4pkIpvwW/WM4Hw== X-UI-Out-Filterresults: notjunk:1; V01:K0:bs9TfngVh2E=:H8ocNQpyu6YmwcsYWS1OsB 9AO+RQAvk6yxJ0MNmYUnDjsHx6zY3rqwAVhY5HZRv9yg3I90nYWYE/DZMRFD9PjCW8p5zjJJO GANocx0JVYM7J7a/FcAbwGnsdhjgvajkvamvQM/N79o6VOiO8XAmqghy7TETFXXkq+Qz2ZXWh lzV5tyVliGdjeR3Ym+xLpRV7dnjsjTCPhmVxk0+C82AJsb1YmnPTLq3LyPyYXMyQi1WzpuAo3 7irPRREtFGcXZ1RVzhM3Qwsp1XzizMhhMo7RU3+Xi16HrgKXDVQASue2vc9LKrNmQjZJB6hAC /9AnpzA93PsDiQ2r+XC/xoJTha8HNgWnhEcuDnzkhU3DeS+1AHxW1bNPlgsmRyb6WLsX7RCwU WEjhvZduRurQMiTrYTMiG5YryWCPywq+R05zh0Bt+irBzK6K8Fc232Px0J6qA4nNpHPIp7gQd 2yN8UhXVWW+n6PuSe+K3BQCYc93CB4c44gTtLNtwM8s9jCwn47ktnjcip4ax89caciGcn9OP0 Isbid+yKmJjFxNcg1oxkog/eerr+tjiMQ1LOvj11EHZ59D8jsinLbbnDSvZ2URYegqfeyw7i1 K+hosbjuBbnphVe/yLCHStNCQWgKCL54bf+D8ipaWAj9ZfEwc++eN3Hw4gaEVOl+2uuvl19bQ gxLOqd56Kb3vAxAocdiL+pfO04veMPhOdkhrwl8B5+Uax5NiFmi8dElXT7+iBm7KXGko= 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 The newly added ektf2127 driver uses the SIMPLE_DEV_PM_OPS macro to conditionally refer to the resume/suspend functions, which causes a warning when CONFIG_PM_SLEEP is disabled: drivers/input/touchscreen/ektf2127.c:168:12: error: 'ektf2127_resume' defined but not used [-Werror=unused-function] drivers/input/touchscreen/ektf2127.c:156:12: error: 'ektf2127_suspend' defined but not used [-Werror=unused-function] We could either put these functions inside of an #ifdef or add __maybe_unused annotations. This uses the second approach, which is generally more foolproof. Fixes: 9ca5bf5029b6 ("Input: add support for Elan eKTF2127 touchscreen controller") Signed-off-by: Arnd Bergmann --- drivers/input/touchscreen/ektf2127.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/touchscreen/ektf2127.c b/drivers/input/touchscreen/ektf2127.c index 31a2dd7f38aa..0ed34ff787ce 100644 --- a/drivers/input/touchscreen/ektf2127.c +++ b/drivers/input/touchscreen/ektf2127.c @@ -153,7 +153,7 @@ static void ektf2127_stop(struct input_dev *dev) gpiod_set_value_cansleep(ts->power_gpios, 0); } -static int ektf2127_suspend(struct device *dev) +static int __maybe_unused ektf2127_suspend(struct device *dev) { struct ektf2127_ts *ts = i2c_get_clientdata(to_i2c_client(dev)); @@ -165,7 +165,7 @@ static int ektf2127_suspend(struct device *dev) return 0; } -static int ektf2127_resume(struct device *dev) +static int __maybe_unused ektf2127_resume(struct device *dev) { struct ektf2127_ts *ts = i2c_get_clientdata(to_i2c_client(dev));