Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1494316
| Path | csiph.com!aioe.org!gothmog.csi.it!bofh.it!news.nic.it!robomod |
|---|---|
| From | Dmitry Torokhov <dmitry.torokhov@gmail.com> |
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH] Input: eKTF2127: mark PM functions as __maybe_unused |
| Date | Sat, 01 Oct 2016 00:40:01 +0200 |
| Message-ID | <sneDf-880-3@gated-at.bofh.it> (permalink) |
| References | <sn8Rb-4hC-5@gated-at.bofh.it> |
| Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=+aM0+Ya5PSvwiJiv6BddX6n1T21kTX+Iin17XYdf9kU=; b=s9zkpdQoEQXq7qf+rRhKGDcaDfHTWCXutJ3q33Re/PsB4BvqRkKFCkJmB1VVAY6TK0 Mte39iGtQ5JUsENlHYyhwgGXHRLdRW7drn2v5YBAFnWiYLo6h+Yp3MSewjRm6pUSfwLl 9xqkYxmjLjBiSPn6R0ZFJRTdYwd8jaSE2fs8oH0qsIpVaIU8gC00liK8GTjXR1ILzVw4 huffLMtMV24NCRQ+PWRrcYFuQ8b1aSuJj8BrHb6Ihh0sCot6y8RfRlEA0jz0ZkqGcVuk sPCRJBk4vQb690k/Dm7fYEjMKiQ00ljvTawlnxDAWN8UVaPXGMEcS4aazN+eeIqEpyVe pP6Q== |
| X-Google-Dkim-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+aM0+Ya5PSvwiJiv6BddX6n1T21kTX+Iin17XYdf9kU=; b=AW6nOscEMRiuqIWTrrFUmWUH3hX/gE63/m9+x3MrT7bcCWK9uB+QIMdU0Tx7AoBnlu DlY2jMhQHyqiPTDz2RHggwtSRM14+2bCmk4rxTqWZqL447lkcNEbMA3WgDZqeHTU6Mii vsVc+F3yd+PClGFdJ5PS4W4mp4nvBhhnos4B3hLuebmR6G+g/xT75GYQ/qfkLg8euFLy Y23m32wQK9FBS/eD3v1I2lfprAfIfrZjBLtFqX5QSBNMzyGY30s+5fRaFcpC2v/ERAdE 6KlXOOV6t31OLDlMnUke9b7O2MbPqNPUDjfKNNaGX/crClFv/5sIvoacX2T9RBvlcAt6 Lobw== |
| X-Gm-Message-State | AA6/9RnkOHuzlxNJuX1Hy6sNdtabGfc4W2AymQt5kzL7ZS5m10iCjhZInEaEvyRSiQx6eQ== |
| X-Received | by 10.66.228.226 with SMTP id sl2mr15493668pac.131.1475275051811; Fri, 30 Sep 2016 15:37:31 -0700 (PDT) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=us-ascii |
| Content-Disposition | inline |
| User-Agent | Mutt/1.5.21 (2010-09-15) |
| Sender | robomod@news.nic.it |
| List-ID | <linux-kernel.vger.kernel.org> |
| X-Mailing-List | linux-kernel@vger.kernel.org |
| Approved | robomod@news.nic.it |
| Lines | 49 |
| Organization | linux.* mail to news gateway |
| X-Original-Cc | Hans de Goede <hdegoede@redhat.com>, Siebren Vroegindeweij <siebren.vroegindeweij@hotmail.com>, Rob Herring <robh@kernel.org>, Michel Verlaan <michel.verl@gmail.com>, linux-input@vger.kernel.org, linux-kernel@vger.kernel.org |
| X-Original-Date | Fri, 30 Sep 2016 15:37:28 -0700 |
| X-Original-Message-ID | <20160930223728.GD30208@dtor-ws> |
| X-Original-References | <20160930162329.183073-1-arnd@arndb.de> |
| X-Original-Sender | linux-kernel-owner@vger.kernel.org |
| Xref | csiph.com linux.kernel:1494316 |
Show key headers only | View raw
On Fri, Sep 30, 2016 at 06:22:33PM +0200, Arnd Bergmann wrote:
> 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 <arnd@arndb.de>
Applied, thank you.
> ---
> 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));
>
> --
> 2.9.0
>
--
Dmitry
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH] Input: eKTF2127: mark PM functions as __maybe_unused Arnd Bergmann <arnd@arndb.de> - 2016-09-30 18:30 +0200 Re: [PATCH] Input: eKTF2127: mark PM functions as __maybe_unused Dmitry Torokhov <dmitry.torokhov@gmail.com> - 2016-10-01 00:40 +0200
csiph-web