From patchwork Sun Dec 4 18:08:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 630991 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92EE0C4708D for ; Sun, 4 Dec 2022 17:56:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230234AbiLDR4N (ORCPT ); Sun, 4 Dec 2022 12:56:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230198AbiLDR4L (ORCPT ); Sun, 4 Dec 2022 12:56:11 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B7639140D0 for ; Sun, 4 Dec 2022 09:56:10 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 63AF0B80B89 for ; Sun, 4 Dec 2022 17:56:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 41651C433C1; Sun, 4 Dec 2022 17:56:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176568; bh=MHTqRd6Sz6bdPi1bmAAWLtTtMGvpgCeIFVu7ZKExuds=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hth3K+VDQjogQpGWyTLdvoX20E3UbA6dae4CpMOJIt8imOy2JBThNFWRWKal/Hxfl ya+nnpkwJtwKRLMwpLAAtv6U0wFbNtIAOJFrCg7BOmxz/dqZa2Uzt4VTRAT27LYFrk GY2I9eS0sIP7RYLATnx0K64UlkODyVBDfevnIsjhs20w7FUhHMae+OYg1CIpWxW+tO w+t2p9qAB83tGYjWE8KRJM0NVyW4xSEuaXmiWaB47NdNCGDBh00br17Eyv3jtdkakh LOUzpW3V7QGTAsABQ+/gUH1Fb5NTH/N3uKRa78EONjFstWsGkYrt2MCxNxzzTaSqCh y3igzrpBdp7gw== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Michael Hennerich Subject: [PATCH 02/32] Input: adp5589-keys - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:11 +0000 Message-Id: <20221204180841.2211588-3-jic23@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221204180841.2211588-1-jic23@kernel.org> References: <20221204180841.2211588-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Jonathan Cameron SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Michael Hennerich --- drivers/input/keyboard/adp5589-keys.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/keyboard/adp5589-keys.c b/drivers/input/keyboard/adp5589-keys.c index 25c9f6344bf2..38d7073863a8 100644 --- a/drivers/input/keyboard/adp5589-keys.c +++ b/drivers/input/keyboard/adp5589-keys.c @@ -1016,7 +1016,7 @@ static int adp5589_probe(struct i2c_client *client) return 0; } -static int __maybe_unused adp5589_suspend(struct device *dev) +static int adp5589_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct adp5589_kpad *kpad = i2c_get_clientdata(client); @@ -1027,7 +1027,7 @@ static int __maybe_unused adp5589_suspend(struct device *dev) return 0; } -static int __maybe_unused adp5589_resume(struct device *dev) +static int adp5589_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct adp5589_kpad *kpad = i2c_get_clientdata(client); @@ -1038,7 +1038,7 @@ static int __maybe_unused adp5589_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(adp5589_dev_pm_ops, adp5589_suspend, adp5589_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(adp5589_dev_pm_ops, adp5589_suspend, adp5589_resume); static const struct i2c_device_id adp5589_id[] = { {"adp5589-keys", ADP5589}, @@ -1052,7 +1052,7 @@ MODULE_DEVICE_TABLE(i2c, adp5589_id); static struct i2c_driver adp5589_driver = { .driver = { .name = KBUILD_MODNAME, - .pm = &adp5589_dev_pm_ops, + .pm = pm_sleep_ptr(&adp5589_dev_pm_ops), }, .probe_new = adp5589_probe, .id_table = adp5589_id, From patchwork Sun Dec 4 18:08:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 630992 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A6250C47090 for ; Sun, 4 Dec 2022 17:56:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230208AbiLDR4O (ORCPT ); Sun, 4 Dec 2022 12:56:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230268AbiLDR4N (ORCPT ); Sun, 4 Dec 2022 12:56:13 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7C008140D0 for ; Sun, 4 Dec 2022 09:56:12 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1AAA6B80B8E for ; Sun, 4 Dec 2022 17:56:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E789CC433D7; Sun, 4 Dec 2022 17:56:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176570; bh=rP4CzG0/AcVjdoHGkquS0ZRSwA95mBNSbJ3ZVt6rlLg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JiBAvo5FWT1laJ4HYAuF/i51q9yMH6EKG7q5tji+6mFadLlsv56KuRltrkpW5sPqE jJVVvJlSCr8uh3itOABMCzkjpwcIGuzTr4tvo4Gm4Hiw0vJjQf6nppONJe0vAfnkMj cuMbcM1TzDfX11E72SGLsnbrPoCXvsxMoCW43yn6cZCoLHKfjCb0V6EW0Tm1VQ+s4L o46pp8bVoWrj4NO1E9G8orxxDF2oGUDp0kyFsL2PXiNcjUm9vP8+5BVH5U5oEa4RHD E6h5q4FdGuDVfLm5fvWr24GrDCK9yTQxzzDEHflbaaXyvJLshzgnR45Cunu4w/Wo15 5GqX3eFP7+ivw== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Yassine Oudjana Subject: [PATCH 04/32] Input: cypress-sf - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:13 +0000 Message-Id: <20221204180841.2211588-5-jic23@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221204180841.2211588-1-jic23@kernel.org> References: <20221204180841.2211588-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Jonathan Cameron SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Yassine Oudjana --- drivers/input/keyboard/cypress-sf.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/keyboard/cypress-sf.c b/drivers/input/keyboard/cypress-sf.c index 9a23eed6a4f4..686388f40317 100644 --- a/drivers/input/keyboard/cypress-sf.c +++ b/drivers/input/keyboard/cypress-sf.c @@ -168,7 +168,7 @@ static int cypress_sf_probe(struct i2c_client *client) return 0; }; -static int __maybe_unused cypress_sf_suspend(struct device *dev) +static int cypress_sf_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct cypress_sf_data *touchkey = i2c_get_clientdata(client); @@ -187,7 +187,7 @@ static int __maybe_unused cypress_sf_suspend(struct device *dev) return 0; } -static int __maybe_unused cypress_sf_resume(struct device *dev) +static int cypress_sf_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct cypress_sf_data *touchkey = i2c_get_clientdata(client); @@ -205,8 +205,8 @@ static int __maybe_unused cypress_sf_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(cypress_sf_pm_ops, - cypress_sf_suspend, cypress_sf_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(cypress_sf_pm_ops, + cypress_sf_suspend, cypress_sf_resume); static struct i2c_device_id cypress_sf_id_table[] = { { CYPRESS_SF_DEV_NAME, 0 }, @@ -225,7 +225,7 @@ MODULE_DEVICE_TABLE(of, cypress_sf_of_match); static struct i2c_driver cypress_sf_driver = { .driver = { .name = CYPRESS_SF_DEV_NAME, - .pm = &cypress_sf_pm_ops, + .pm = pm_sleep_ptr(&cypress_sf_pm_ops), .of_match_table = of_match_ptr(cypress_sf_of_match), }, .id_table = cypress_sf_id_table, From patchwork Sun Dec 4 18:08:14 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 630990 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1962C636F8 for ; Sun, 4 Dec 2022 17:56:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230209AbiLDR4Q (ORCPT ); Sun, 4 Dec 2022 12:56:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230268AbiLDR4P (ORCPT ); Sun, 4 Dec 2022 12:56:15 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 81766140D0 for ; Sun, 4 Dec 2022 09:56:14 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 4340FB80886 for ; Sun, 4 Dec 2022 17:56:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 45DF0C433C1; Sun, 4 Dec 2022 17:56:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176572; bh=XlqaHO4DKK4/tExXGHlwiTmpl72Ain9+PidTnAzVTzA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=cc3QqKQliuAClX/k5qsL4MJLkXvi3vMoCCFlNlYUS2Qpy/5Dq0DNFyucmn+eajCrN So4xWcuzcV7NHWCvRlM/SkSnUbZdsvQihz6Z2/oTO+xDAD2yOA5IOi2v0QJb/7JT8o 6DPE14Of5yjfdCf9ameRVlScMZwB6UzcJPU4a1Pogbb+MULuV08QlEtBU/uLDawCEC dCLjnLlZZTJ8q16Tni23gr+n//1te1IJ+i32dcutSqF/A4MePYFceXk8WrzW6ZkDFZ AT5FLI0dPWVHEbR2PG7Gmp/WKLfNRtoFynmVjbrBIi3+iJ2jR+2CuWwE41IumpmLSv BRw6n+uITTxNQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 05/32] Input: ep39xx-keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:14 +0000 Message-Id: <20221204180841.2211588-6-jic23@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221204180841.2211588-1-jic23@kernel.org> References: <20221204180841.2211588-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Jonathan Cameron SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron --- drivers/input/keyboard/ep93xx_keypad.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/keyboard/ep93xx_keypad.c b/drivers/input/keyboard/ep93xx_keypad.c index f5bf7524722a..55075addcac2 100644 --- a/drivers/input/keyboard/ep93xx_keypad.c +++ b/drivers/input/keyboard/ep93xx_keypad.c @@ -178,7 +178,7 @@ static void ep93xx_keypad_close(struct input_dev *pdev) } -static int __maybe_unused ep93xx_keypad_suspend(struct device *dev) +static int ep93xx_keypad_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct ep93xx_keypad *keypad = platform_get_drvdata(pdev); @@ -196,7 +196,7 @@ static int __maybe_unused ep93xx_keypad_suspend(struct device *dev) return 0; } -static int __maybe_unused ep93xx_keypad_resume(struct device *dev) +static int ep93xx_keypad_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct ep93xx_keypad *keypad = platform_get_drvdata(pdev); @@ -217,8 +217,8 @@ static int __maybe_unused ep93xx_keypad_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(ep93xx_keypad_pm_ops, - ep93xx_keypad_suspend, ep93xx_keypad_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(ep93xx_keypad_pm_ops, + ep93xx_keypad_suspend, ep93xx_keypad_resume); static void ep93xx_keypad_release_gpio_action(void *_pdev) { @@ -318,7 +318,7 @@ static int ep93xx_keypad_remove(struct platform_device *pdev) static struct platform_driver ep93xx_keypad_driver = { .driver = { .name = "ep93xx-keypad", - .pm = &ep93xx_keypad_pm_ops, + .pm = pm_sleep_ptr(&ep93xx_keypad_pm_ops), }, .probe = ep93xx_keypad_probe, .remove = ep93xx_keypad_remove, From patchwork Sun Dec 4 18:08:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 630989 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 91B4CC3A5A7 for ; Sun, 4 Dec 2022 17:56:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230282AbiLDR4S (ORCPT ); Sun, 4 Dec 2022 12:56:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41416 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230123AbiLDR4R (ORCPT ); Sun, 4 Dec 2022 12:56:17 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3E24A140D2 for ; Sun, 4 Dec 2022 09:56:17 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id EB374B80886 for ; Sun, 4 Dec 2022 17:56:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9D032C433C1; Sun, 4 Dec 2022 17:56:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176574; bh=3Lky+xKxHB3nBcYHWbORFQoR4+X4lAy6Ei+zknpbUG4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=jvAwqj1WBtNU4nn27LeuWO3VOOf0TOiqWcfwexSqxSfOdUH0W1RzM+JGTfEh1eI6L etRktfxiV40G1/LHJPOeJtu082l/+O52XRygyHV0sogv8AEfvzT4AGxCUkN8St0FFJ 18h9SZCFks2qQya5uf5FRVvSofJLsoTBZYmqRCtLaQqSLNE3UMVGl2z1hWjWA2wYBd suA4zIFgSYiTqrgi4xyS0LXfR3bb9aiDYSGK/7dBEBZzqd5/L0ttavs7WJdWvazcdD T7gjbNSdyj5F2K84GsN7AUN4GMvQztyBhBQ0otyizSZr7hyAiTBemQOoc2kZciYwT9 QfG8ZRxMr/TQA== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Linus Walleij Subject: [PATCH 07/32] Input: ipaq-micro-keys - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:16 +0000 Message-Id: <20221204180841.2211588-8-jic23@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221204180841.2211588-1-jic23@kernel.org> References: <20221204180841.2211588-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Jonathan Cameron SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Linus Walleij Acked-by: Linus Walleij --- drivers/input/keyboard/ipaq-micro-keys.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/keyboard/ipaq-micro-keys.c b/drivers/input/keyboard/ipaq-micro-keys.c index 13a66a8e3411..7b509bce2b33 100644 --- a/drivers/input/keyboard/ipaq-micro-keys.c +++ b/drivers/input/keyboard/ipaq-micro-keys.c @@ -124,7 +124,7 @@ static int micro_key_probe(struct platform_device *pdev) return 0; } -static int __maybe_unused micro_key_suspend(struct device *dev) +static int micro_key_suspend(struct device *dev) { struct ipaq_micro_keys *keys = dev_get_drvdata(dev); @@ -133,7 +133,7 @@ static int __maybe_unused micro_key_suspend(struct device *dev) return 0; } -static int __maybe_unused micro_key_resume(struct device *dev) +static int micro_key_resume(struct device *dev) { struct ipaq_micro_keys *keys = dev_get_drvdata(dev); struct input_dev *input = keys->input; @@ -148,13 +148,13 @@ static int __maybe_unused micro_key_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(micro_key_dev_pm_ops, - micro_key_suspend, micro_key_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(micro_key_dev_pm_ops, + micro_key_suspend, micro_key_resume); static struct platform_driver micro_key_device_driver = { .driver = { .name = "ipaq-micro-keys", - .pm = µ_key_dev_pm_ops, + .pm = pm_sleep_ptr(µ_key_dev_pm_ops), }, .probe = micro_key_probe, }; From patchwork Sun Dec 4 18:08:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 630988 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1CE4C4321E for ; Sun, 4 Dec 2022 17:56:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230123AbiLDR4V (ORCPT ); Sun, 4 Dec 2022 12:56:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41428 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229960AbiLDR4U (ORCPT ); Sun, 4 Dec 2022 12:56:20 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 924E7140CD for ; Sun, 4 Dec 2022 09:56:19 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 2DEBD60EDD for ; Sun, 4 Dec 2022 17:56:19 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A4D65C433D6; Sun, 4 Dec 2022 17:56:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176578; bh=PLyI93Tj2D3ZXvAGonBYuVmFq83B08FPwkoUUbRdQzg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=eYUNF/7DTRLPlssZ+lt6V4jj1e9Lu57al1k7r/nY6o6uC4LxlNBk8s92JahuIYPjN +t30kE5z5FKk51mKgve00iHV6vPZ7uQSHeZducdM2XN6S61SBmN0ZRanjIeLgATfoB MEbNIJkh9JhgRqOmmq9lA4Z3CD6e4BR9ooZ1wp7+3RERMWuTHMJE+AsaRDeMa7adGp 7XKBoV15pHEqS675QLdu0TtzZ52U3xGl0ynQFb5P9f/Foh+92H6ItdWOZdVSJkPkfl JEbVzFhpC+UMHcYwlq3vNp2dGlnhfWUvows6QktjSllaIWx+tvawR6Yq8jl4m1dIBT aSGcxraFl+szQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Marco Felsch Subject: [PATCH 10/32] Input: qt1050 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:19 +0000 Message-Id: <20221204180841.2211588-11-jic23@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221204180841.2211588-1-jic23@kernel.org> References: <20221204180841.2211588-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Jonathan Cameron SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the __maybe_unused markings. Signed-off-by: Jonathan Cameron Cc: Marco Felsch Reviewed-by: Marco Felsch --- drivers/input/keyboard/qt1050.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/keyboard/qt1050.c b/drivers/input/keyboard/qt1050.c index 403060d05c3b..317fe2b1f827 100644 --- a/drivers/input/keyboard/qt1050.c +++ b/drivers/input/keyboard/qt1050.c @@ -547,7 +547,7 @@ static int qt1050_probe(struct i2c_client *client) return 0; } -static int __maybe_unused qt1050_suspend(struct device *dev) +static int qt1050_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct qt1050_priv *ts = i2c_get_clientdata(client); @@ -563,7 +563,7 @@ static int __maybe_unused qt1050_suspend(struct device *dev) device_may_wakeup(dev) ? 125 : 0); } -static int __maybe_unused qt1050_resume(struct device *dev) +static int qt1050_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct qt1050_priv *ts = i2c_get_clientdata(client); @@ -574,7 +574,7 @@ static int __maybe_unused qt1050_resume(struct device *dev) return regmap_write(ts->regmap, QT1050_LPMODE, 2); } -static SIMPLE_DEV_PM_OPS(qt1050_pm_ops, qt1050_suspend, qt1050_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(qt1050_pm_ops, qt1050_suspend, qt1050_resume); static const struct of_device_id __maybe_unused qt1050_of_match[] = { { .compatible = "microchip,qt1050", }, @@ -586,7 +586,7 @@ static struct i2c_driver qt1050_driver = { .driver = { .name = "qt1050", .of_match_table = of_match_ptr(qt1050_of_match), - .pm = &qt1050_pm_ops, + .pm = pm_sleep_ptr(&qt1050_pm_ops), }, .probe_new = qt1050_probe, }; From patchwork Sun Dec 4 18:08:22 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 630987 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C1161C4321E for ; Sun, 4 Dec 2022 17:57:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230324AbiLDR4w (ORCPT ); Sun, 4 Dec 2022 12:56:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41452 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230036AbiLDR4Z (ORCPT ); Sun, 4 Dec 2022 12:56:25 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EE4C3140D0 for ; Sun, 4 Dec 2022 09:56:24 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 8C8C4B80B89 for ; Sun, 4 Dec 2022 17:56:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 80344C433C1; Sun, 4 Dec 2022 17:56:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176582; bh=fy6Qm8//JB92RZWtxsfcCWVK00HVnMmRKB46QXrvF1E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ypec/pJhUdj74wTOnbfHJl9IFdnhPSH/tM5ovNmMZtzc0qGfu0QIpiMafCiYGi5g9 7elwIQeu5J9ULGFC/w569YQLE6hLfTyekBF8P5ofKPlRAAQIL3ReSwYGGG6mYkBtYE o0YE74JKxLFiqxijCfjyDYyIs0pi4uWlZxycZqgI8Qlf6ma8h/+vt7GrrRSFm1PiT+ sBzWPzuASRk34D4xsu3YvziK2E1dasLKk60aoJoJW7nrkW17IfCZCLyhTM7dNMWJ3P DxYEvRbl/aNF/QQp43TsDHu5MwfLADs05lKI50bmJ5BMaXd7F9S4+lE3BB5WsADLm8 HO71UaF690eyQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 13/32] Input: lm8323 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:22 +0000 Message-Id: <20221204180841.2211588-14-jic23@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221204180841.2211588-1-jic23@kernel.org> References: <20221204180841.2211588-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Jonathan Cameron SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the ifdef guards. Signed-off-by: Jonathan Cameron --- drivers/input/keyboard/lm8323.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/input/keyboard/lm8323.c b/drivers/input/keyboard/lm8323.c index 4846eccb0a93..5df4d5a7ed9e 100644 --- a/drivers/input/keyboard/lm8323.c +++ b/drivers/input/keyboard/lm8323.c @@ -770,7 +770,6 @@ static void lm8323_remove(struct i2c_client *client) kfree(lm); } -#ifdef CONFIG_PM_SLEEP /* * We don't need to explicitly suspend the chip, as it already switches off * when there's no activity. @@ -814,9 +813,8 @@ static int lm8323_resume(struct device *dev) return 0; } -#endif -static SIMPLE_DEV_PM_OPS(lm8323_pm_ops, lm8323_suspend, lm8323_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(lm8323_pm_ops, lm8323_suspend, lm8323_resume); static const struct i2c_device_id lm8323_id[] = { { "lm8323", 0 }, @@ -826,7 +824,7 @@ static const struct i2c_device_id lm8323_id[] = { static struct i2c_driver lm8323_i2c_driver = { .driver = { .name = "lm8323", - .pm = &lm8323_pm_ops, + .pm = pm_sleep_ptr(&lm8323_pm_ops), }, .probe_new = lm8323_probe, .remove = lm8323_remove, From patchwork Sun Dec 4 18:08:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 630986 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4A8EFC636F8 for ; Sun, 4 Dec 2022 17:57:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230036AbiLDR4x (ORCPT ); Sun, 4 Dec 2022 12:56:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230286AbiLDR41 (ORCPT ); Sun, 4 Dec 2022 12:56:27 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 65C1C140CD for ; Sun, 4 Dec 2022 09:56:26 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 205D8B80B8A for ; Sun, 4 Dec 2022 17:56:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7283C433C1; Sun, 4 Dec 2022 17:56:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176584; bh=9lLSaUUPEH0GXqgySigGjoaOcjTG/JbDCrjpOyjkK7w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kmyuIFv73eUxAwCekcJa2Gujopt5XGcrUWQdcvHIBGXRo6sw2VghlfKuaPB8xNNRV JYP/x3S6nI7PF2ls5zp1jvw9DSzNRc3LwOmObHGp68cMycon+OJFARh4zyZGPGfQoI TZb7U8l06VpkzhgmZY7g4qly6zczDpaj/LKxv5y3YWPvhxosnGcFOKN85zJR9zNIhZ RpGrHEdXn8Jmq/xvc6iuWNVplSR1dE2KR+i+rCj7Uw8vUFn5o5xQS0LivYh5fYa43Y t2qsYH3Uri9swZlQPdpI7WY0aJGNJtWyNVUJi39SjKkJ0ZY42yggWQqQ4NRalbp356 4Q+s+/JeEU08Q== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Marek Vasut Subject: [PATCH 15/32] Input: matrix-keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:24 +0000 Message-Id: <20221204180841.2211588-16-jic23@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221204180841.2211588-1-jic23@kernel.org> References: <20221204180841.2211588-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Jonathan Cameron SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the ifdef guards. Signed-off-by: Jonathan Cameron Cc: Marek Vasut --- drivers/input/keyboard/matrix_keypad.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/input/keyboard/matrix_keypad.c b/drivers/input/keyboard/matrix_keypad.c index b4c0325bbf1a..203310727d88 100644 --- a/drivers/input/keyboard/matrix_keypad.c +++ b/drivers/input/keyboard/matrix_keypad.c @@ -230,7 +230,6 @@ static void matrix_keypad_stop(struct input_dev *dev) disable_row_irqs(keypad); } -#ifdef CONFIG_PM_SLEEP static void matrix_keypad_enable_wakeup(struct matrix_keypad *keypad) { const struct matrix_keypad_platform_data *pdata = keypad->pdata; @@ -299,10 +298,9 @@ static int matrix_keypad_resume(struct device *dev) return 0; } -#endif -static SIMPLE_DEV_PM_OPS(matrix_keypad_pm_ops, - matrix_keypad_suspend, matrix_keypad_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(matrix_keypad_pm_ops, + matrix_keypad_suspend, matrix_keypad_resume); static int matrix_keypad_init_gpio(struct platform_device *pdev, struct matrix_keypad *keypad) @@ -577,7 +575,7 @@ static struct platform_driver matrix_keypad_driver = { .remove = matrix_keypad_remove, .driver = { .name = "matrix-keypad", - .pm = &matrix_keypad_pm_ops, + .pm = pm_sleep_ptr(&matrix_keypad_pm_ops), .of_match_table = of_match_ptr(matrix_keypad_dt_match), }, }; From patchwork Sun Dec 4 18:08:25 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 630985 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5D5BBC47090 for ; Sun, 4 Dec 2022 17:57:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230329AbiLDR4y (ORCPT ); Sun, 4 Dec 2022 12:56:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230287AbiLDR43 (ORCPT ); Sun, 4 Dec 2022 12:56:29 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85983140CD for ; Sun, 4 Dec 2022 09:56:28 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 3A156B80B89 for ; Sun, 4 Dec 2022 17:56:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 36468C433D6; Sun, 4 Dec 2022 17:56:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176586; bh=zF6amAXTX9YciA6NiuXXHgBN8jTQyFOrZOg9yvy/vnA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=IKCHkix1F2I0qj2ZYmq+QOq8CR0SRi62THiKdiUAUU2kiecl5C8GjyReQEpKfHNrB SnA/z/MrlQHQImn2SneUnvvKalscB0cNudA8FMWKut/8rtp+eBxIW4gzEoNw54aYHw mT7tSvwVUv5nzsnEODBv/PreRs6wS05gK/I8BBX+AamHDRwgr5lpFdzopFJPqyVhXN 3a6X9osmm82QLlkGLh2qRwCdGT2BfOZc35uOwnwunBdik+l2yMvdZSg8fYXnZuDvsK GJqTu0jy+jaT//vpeaGxgaRPmcifdSdb7JRhGh7O3tOhyssNHziYfRXpsRR+J01Tcb 0SmP4S+KqO/EA== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 16/32] Input: max7359-keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:25 +0000 Message-Id: <20221204180841.2211588-17-jic23@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221204180841.2211588-1-jic23@kernel.org> References: <20221204180841.2211588-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Jonathan Cameron SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the ifdef guards. Signed-off-by: Jonathan Cameron --- drivers/input/keyboard/max7359_keypad.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/input/keyboard/max7359_keypad.c b/drivers/input/keyboard/max7359_keypad.c index 1bba11ed4132..b363749d02e2 100644 --- a/drivers/input/keyboard/max7359_keypad.c +++ b/drivers/input/keyboard/max7359_keypad.c @@ -242,7 +242,6 @@ static int max7359_probe(struct i2c_client *client) return 0; } -#ifdef CONFIG_PM_SLEEP static int max7359_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); @@ -267,9 +266,8 @@ static int max7359_resume(struct device *dev) return 0; } -#endif -static SIMPLE_DEV_PM_OPS(max7359_pm, max7359_suspend, max7359_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(max7359_pm, max7359_suspend, max7359_resume); static const struct i2c_device_id max7359_ids[] = { { "max7359", 0 }, @@ -280,7 +278,7 @@ MODULE_DEVICE_TABLE(i2c, max7359_ids); static struct i2c_driver max7359_i2c_driver = { .driver = { .name = "max7359", - .pm = &max7359_pm, + .pm = pm_sleep_ptr(&max7359_pm), }, .probe_new = max7359_probe, .id_table = max7359_ids, From patchwork Sun Dec 4 18:08:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 630984 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id B3EE1C63707 for ; Sun, 4 Dec 2022 17:57:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230331AbiLDR4z (ORCPT ); Sun, 4 Dec 2022 12:56:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230292AbiLDR4a (ORCPT ); Sun, 4 Dec 2022 12:56:30 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2F02140D2 for ; Sun, 4 Dec 2022 09:56:29 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 64A80B80B8A for ; Sun, 4 Dec 2022 17:56:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 65529C433B5; Sun, 4 Dec 2022 17:56:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176587; bh=1uYTSA3Wuayjm+Jl/K7BBz072B6EuiSzLKQAvcY0wsw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Sn+fzMS28oYN/OjneVqmw0loXTvNRykExEEVDxgA0rt9EIvHkPGhaPUR+zS3pybSS lJ/5yDN1mX5jnctao2fumkAsSStcCnYVcJCl54l+T9kfcpBIxMyoz0EhBi60isD50U s2VD1z6QZ66d/hpehXmMRPI3/rjape7t1PAbm1VSwjxX6QCEd55ur6lCNI2W194gam I7AP5P4dbGZnoyfZu46TepWD/dCOTjgLSstkEi0sInebhO+BsN4Wo7wTO9KNtuyKPw ZDtdl32LYFiBIMfVtncvANFt3zLwvxgjPn92cUhfzc5LQYRkZ8ciYP4nqy7ph4JtJU g73ncV4hCrA8g== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 17/32] Input: mcs-touchkey - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:26 +0000 Message-Id: <20221204180841.2211588-18-jic23@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221204180841.2211588-1-jic23@kernel.org> References: <20221204180841.2211588-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Jonathan Cameron SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the ifdef guards. Signed-off-by: Jonathan Cameron --- drivers/input/keyboard/mcs_touchkey.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/input/keyboard/mcs_touchkey.c b/drivers/input/keyboard/mcs_touchkey.c index 34683458524c..d414e19e4559 100644 --- a/drivers/input/keyboard/mcs_touchkey.c +++ b/drivers/input/keyboard/mcs_touchkey.c @@ -213,7 +213,6 @@ static void mcs_touchkey_shutdown(struct i2c_client *client) data->poweron(false); } -#ifdef CONFIG_PM_SLEEP static int mcs_touchkey_suspend(struct device *dev) { struct mcs_touchkey_data *data = dev_get_drvdata(dev); @@ -243,10 +242,9 @@ static int mcs_touchkey_resume(struct device *dev) return 0; } -#endif -static SIMPLE_DEV_PM_OPS(mcs_touchkey_pm_ops, - mcs_touchkey_suspend, mcs_touchkey_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(mcs_touchkey_pm_ops, + mcs_touchkey_suspend, mcs_touchkey_resume); static const struct i2c_device_id mcs_touchkey_id[] = { { "mcs5000_touchkey", MCS5000_TOUCHKEY }, @@ -258,7 +256,7 @@ MODULE_DEVICE_TABLE(i2c, mcs_touchkey_id); static struct i2c_driver mcs_touchkey_driver = { .driver = { .name = "mcs_touchkey", - .pm = &mcs_touchkey_pm_ops, + .pm = pm_sleep_ptr(&mcs_touchkey_pm_ops), }, .probe_new = mcs_touchkey_probe, .remove = mcs_touchkey_remove, From patchwork Sun Dec 4 18:08:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 630983 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id D9BB6C63709 for ; Sun, 4 Dec 2022 17:57:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230343AbiLDR45 (ORCPT ); Sun, 4 Dec 2022 12:56:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230294AbiLDR4c (ORCPT ); Sun, 4 Dec 2022 12:56:32 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D2E03140CD for ; Sun, 4 Dec 2022 09:56:31 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 7224560EDC for ; Sun, 4 Dec 2022 17:56:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DC91C433C1; Sun, 4 Dec 2022 17:56:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176590; bh=xAd5M6NwM0b7ZKljlJYd9WdFRhHFhDcNsCUVZEGTHMg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=pWRJFsrDLyUWq44BCtfY1OGFbi0+ZxQnCDy2IBsz+/BnZESLhg2At15iCztQxsvmi xMiD4pc2ZuYuA2LHUTvdE+IBXzfbyb8Zdu/LsGSLfVVvXgaEJ/OaB+dPOV0N7kp18N TKH+WBj1IKkW/khX1Dtkq/xiIBe0C7b4UKnHLDSvofWWz1rl6clze4oKuBKKSBQjCk iaW9HlIRm8hy+g0chJD8CaWgct5yXbQUgq6w8xm452CN39+OBv0tPH+yWe8tvovuf2 AO+zBpBeAm00t8dzLgrf03WmrvXKK0vfFKX1xwohAK/mkTRhBhr4UEf7cCahBSQxUU K74w82PNVTQLA== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 20/32] Input: pxa27x_keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:29 +0000 Message-Id: <20221204180841.2211588-21-jic23@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221204180841.2211588-1-jic23@kernel.org> References: <20221204180841.2211588-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Jonathan Cameron SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the ifdef guards. Signed-off-by: Jonathan Cameron --- drivers/input/keyboard/pxa27x_keypad.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/input/keyboard/pxa27x_keypad.c b/drivers/input/keyboard/pxa27x_keypad.c index a7f8257c8a02..871f858d0ba7 100644 --- a/drivers/input/keyboard/pxa27x_keypad.c +++ b/drivers/input/keyboard/pxa27x_keypad.c @@ -660,7 +660,6 @@ static void pxa27x_keypad_close(struct input_dev *dev) clk_disable_unprepare(keypad->clk); } -#ifdef CONFIG_PM_SLEEP static int pxa27x_keypad_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -706,10 +705,9 @@ static int pxa27x_keypad_resume(struct device *dev) return ret; } -#endif -static SIMPLE_DEV_PM_OPS(pxa27x_keypad_pm_ops, - pxa27x_keypad_suspend, pxa27x_keypad_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(pxa27x_keypad_pm_ops, + pxa27x_keypad_suspend, pxa27x_keypad_resume); static int pxa27x_keypad_probe(struct platform_device *pdev) @@ -830,7 +828,7 @@ static struct platform_driver pxa27x_keypad_driver = { .driver = { .name = "pxa27x-keypad", .of_match_table = of_match_ptr(pxa27x_keypad_dt_match), - .pm = &pxa27x_keypad_pm_ops, + .pm = pm_sleep_ptr(&pxa27x_keypad_pm_ops), }, }; module_platform_driver(pxa27x_keypad_driver); From patchwork Sun Dec 4 18:08:32 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 630982 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5EE64C63713 for ; Sun, 4 Dec 2022 17:57:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230297AbiLDR46 (ORCPT ); Sun, 4 Dec 2022 12:56:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230299AbiLDR4h (ORCPT ); Sun, 4 Dec 2022 12:56:37 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13058140D2 for ; Sun, 4 Dec 2022 09:56:37 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id B9306B80B89 for ; Sun, 4 Dec 2022 17:56:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A8C58C433B5; Sun, 4 Dec 2022 17:56:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176594; bh=gKIvMf4wVEHJ4qJUOqbOF0pyWbzOSoVIFHxEQQklGi0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sZOVfYLFBGZ74W5Mxr/xy3KaPzyfzTD+LkGZRZxh8F7OSUQLXWI5LoLo+0w/mpyli VYu+0NsYUbRjCN3+xuuJIHrP339gl2ohTqHmI3C9jE2VNpwpKIatExDoNXf8FHqrLV jmhUNleneKhMVd2eD1cBmhI1sh0kXxfhTsyIh/XKJn/cSKc8dLj+MoVqzeU1bremzR BTOv/ojp5D9Y9dE2RDQoUocFmZ8qTkbud8fxrHlGAYkTc76XsztGkp1sAa7xjXq3gl TK9JoXSb+qGEt3ajQ/hsfCm1RFl43TEXIPvusrxQkBrwr26feEglAHZ6XhgaJpzTIg Z7ZUKZtOEtdNg== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 23/32] Input: st-keyscan - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:32 +0000 Message-Id: <20221204180841.2211588-24-jic23@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221204180841.2211588-1-jic23@kernel.org> References: <20221204180841.2211588-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Jonathan Cameron SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the ifdef guards. Signed-off-by: Jonathan Cameron --- drivers/input/keyboard/st-keyscan.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/input/keyboard/st-keyscan.c b/drivers/input/keyboard/st-keyscan.c index a62bb8fff88c..13735a5e8391 100644 --- a/drivers/input/keyboard/st-keyscan.c +++ b/drivers/input/keyboard/st-keyscan.c @@ -212,7 +212,6 @@ static int keyscan_probe(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP static int keyscan_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -247,9 +246,9 @@ static int keyscan_resume(struct device *dev) mutex_unlock(&input->mutex); return retval; } -#endif -static SIMPLE_DEV_PM_OPS(keyscan_dev_pm_ops, keyscan_suspend, keyscan_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(keyscan_dev_pm_ops, + keyscan_suspend, keyscan_resume); static const struct of_device_id keyscan_of_match[] = { { .compatible = "st,sti-keyscan" }, @@ -261,7 +260,7 @@ static struct platform_driver keyscan_device_driver = { .probe = keyscan_probe, .driver = { .name = "st-keyscan", - .pm = &keyscan_dev_pm_ops, + .pm = pm_sleep_ptr(&keyscan_dev_pm_ops), .of_match_table = of_match_ptr(keyscan_of_match), } }; From patchwork Sun Dec 4 18:08:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 630981 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88C2FC63715 for ; Sun, 4 Dec 2022 17:57:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230352AbiLDR47 (ORCPT ); Sun, 4 Dec 2022 12:56:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41546 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230298AbiLDR4h (ORCPT ); Sun, 4 Dec 2022 12:56:37 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9EFA3140CD for ; Sun, 4 Dec 2022 09:56:36 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 3B52660DEB for ; Sun, 4 Dec 2022 17:56:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D537BC43470; Sun, 4 Dec 2022 17:56:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176595; bh=60Ukzlb6cd5F4UzQ06v/qkbtLwp5G12OMTw7hfYOvLE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mmkxBeMTLqeDQUELypssZm7upcFsjijMZYhoWZ7CUT8ruEvfLewy18zQIy+C/7eWO 7yAFmfnEbzlYEjhxt5EGOFMM0oKvG1PIttu6b0JT8wOUJXjC2LaJ10QCKNCNQ5cyj0 vdjp/fRhyE7QbgItHj6tKEJ8A89nDEOWqDnUvLO91ENUB/HFO1O+qYB7oMZjjXCHmh 5yGcbmLJYVL4LdI9dQvt0BS+rvfvFMH/o7Yfl9XeKi9sAemeJsYhXiCAwurNGWmDy2 at7157qI/vYlnTPGh2331HQIo9pZ7owf6j45BuJ/G6/IEKA2opEIrzR2L1u2UFiOre u3h3unCH8AUUA== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 24/32] Input: tc3589x - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:33 +0000 Message-Id: <20221204180841.2211588-25-jic23@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221204180841.2211588-1-jic23@kernel.org> References: <20221204180841.2211588-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Jonathan Cameron SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the ifdef guards. Signed-off-by: Jonathan Cameron --- drivers/input/keyboard/tc3589x-keypad.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/input/keyboard/tc3589x-keypad.c b/drivers/input/keyboard/tc3589x-keypad.c index 78e55318ccd6..b0d86621c60a 100644 --- a/drivers/input/keyboard/tc3589x-keypad.c +++ b/drivers/input/keyboard/tc3589x-keypad.c @@ -455,7 +455,6 @@ static int tc3589x_keypad_probe(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP static int tc3589x_keypad_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -492,15 +491,14 @@ static int tc3589x_keypad_resume(struct device *dev) return 0; } -#endif -static SIMPLE_DEV_PM_OPS(tc3589x_keypad_dev_pm_ops, - tc3589x_keypad_suspend, tc3589x_keypad_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(tc3589x_keypad_dev_pm_ops, + tc3589x_keypad_suspend, tc3589x_keypad_resume); static struct platform_driver tc3589x_keypad_driver = { .driver = { .name = "tc3589x-keypad", - .pm = &tc3589x_keypad_dev_pm_ops, + .pm = pm_sleep_ptr(&tc3589x_keypad_dev_pm_ops), }, .probe = tc3589x_keypad_probe, }; From patchwork Sun Dec 4 18:08:35 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 630979 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 0B3A5C4321E for ; Sun, 4 Dec 2022 17:57:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230357AbiLDR47 (ORCPT ); Sun, 4 Dec 2022 12:56:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41574 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230303AbiLDR4l (ORCPT ); Sun, 4 Dec 2022 12:56:41 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2585140D2 for ; Sun, 4 Dec 2022 09:56:40 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 6BF1BB80B89 for ; Sun, 4 Dec 2022 17:56:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 60510C433D7; Sun, 4 Dec 2022 17:56:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176598; bh=5Xqe7+TpXazbJZsPvdZ7dk3sGkxOgsOgTQudFoDy14Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WhHCN4naH/pNgE6SJKYWzsEi744afHIp4J7lGaBuq6nSi5Zwhuvialjocb9v2k0hK rvBBoD4cfGNaz2nBB1NlXAqDUIywG0RUgdCAs+ejncZFPDXCxymSGu2lUaxmbrBpKo X8q2Dkp0Z95LIeINJvmRY3Wgd8AHbV9ElXNKYsl9Qaz5aVujd+v5JxziXjIOzpZKWm DxzuRI67fDLvPvuWXBLoQDDM70OvTpwSlgipVkeoJW0GuTGehMHMWtU87Oy35csh+G p/WdTHGjPAa12nkr3VMjpeJ7EmYf+oK8+KkRKLHNSX3sdHilnTCGbaVCD0zRXkuHw5 uhlg7UAlHustw== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 26/32] Input: tegra-kbc - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:35 +0000 Message-Id: <20221204180841.2211588-27-jic23@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221204180841.2211588-1-jic23@kernel.org> References: <20221204180841.2211588-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Jonathan Cameron SIMPLE_DEV_PM_OPS() is deprecated as it requires explicit protection against unused function warnings. The new combination of pm_sleep_ptr() and DEFINE_SIMPLE_DEV_PM_OPS() allows the compiler to see the functions, thus suppressing the warning, but still allowing the unused code to be removed. Thus also drop the ifdef guards. Signed-off-by: Jonathan Cameron --- drivers/input/keyboard/tegra-kbc.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index 570fe18c0ce9..1eba06bcf27a 100644 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c @@ -713,7 +713,6 @@ static int tegra_kbc_probe(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP static void tegra_kbc_set_keypress_interrupt(struct tegra_kbc *kbc, bool enable) { u32 val; @@ -802,15 +801,15 @@ static int tegra_kbc_resume(struct device *dev) return err; } -#endif -static SIMPLE_DEV_PM_OPS(tegra_kbc_pm_ops, tegra_kbc_suspend, tegra_kbc_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(tegra_kbc_pm_ops, + tegra_kbc_suspend, tegra_kbc_resume); static struct platform_driver tegra_kbc_driver = { .probe = tegra_kbc_probe, .driver = { .name = "tegra-kbc", - .pm = &tegra_kbc_pm_ops, + .pm = pm_sleep_ptr(&tegra_kbc_pm_ops), .of_match_table = tegra_kbc_of_match, }, }; From patchwork Sun Dec 4 18:08:36 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 630980 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4313CC4708D for ; Sun, 4 Dec 2022 17:57:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230306AbiLDR5C (ORCPT ); Sun, 4 Dec 2022 12:57:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41592 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230304AbiLDR4m (ORCPT ); Sun, 4 Dec 2022 12:56:42 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EA005140CD for ; Sun, 4 Dec 2022 09:56:41 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 94B6EB80B92 for ; Sun, 4 Dec 2022 17:56:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CF13C433C1; Sun, 4 Dec 2022 17:56:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176599; bh=Dx7r1yc4Gya8vLmmjUMmR/jNA9Ing0ovYlagkS/LdMc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZFes9/17J1EoJoH7NPi2xoQ78Al2F8CwZJT90tp9AahxVppVct5hTqOezdU2PYBNA 2KkbBwc7r15eF4lkZx2vvCjk35DcDtEIhMhXeQoXSag14I/8jT8PRzLUCkco43ruB/ XvSZO/IE7FCVe6Sskpqm+zsn1dj1MHE4gU+jz3WZR3KLHBkdGaFUWSrmMCfbD7/4wE 0ZeAGgA/0+tnwOVDgOoD3bLu+nLP7DeF+VYsZajUReJpOcdk6/WqlP0oKpbK7uV1br ljnWgYfrxDcYXrqik3/Ag2u+BCVAdzjimV0crGhBtT7hHEwB3gklAb6Ll0K4PCy2qY xQ6Wc6iW2ROzA== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 27/32] Input: tegra-kbc - allow build with COMPILE_TEST Date: Sun, 4 Dec 2022 18:08:36 +0000 Message-Id: <20221204180841.2211588-28-jic23@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221204180841.2211588-1-jic23@kernel.org> References: <20221204180841.2211588-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Jonathan Cameron Used to build test PM changes. Signed-off-by: Jonathan Cameron --- drivers/input/keyboard/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index 00292118b79b..28a9ad8a1466 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig @@ -508,7 +508,7 @@ config KEYBOARD_NSPIRE config KEYBOARD_TEGRA tristate "NVIDIA Tegra internal matrix keyboard controller support" - depends on ARCH_TEGRA && OF + depends on (ARCH_TEGRA && OF) || COMPILE_TEST select INPUT_MATRIXKMAP help Say Y here if you want to use a matrix keyboard connected directly From patchwork Sun Dec 4 18:08:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 630978 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5695EC6371D for ; Sun, 4 Dec 2022 17:57:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230371AbiLDR5C (ORCPT ); Sun, 4 Dec 2022 12:57:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41600 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230307AbiLDR4n (ORCPT ); Sun, 4 Dec 2022 12:56:43 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A7530140D3 for ; Sun, 4 Dec 2022 09:56:42 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 4499960EDD for ; Sun, 4 Dec 2022 17:56:42 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E6958C433C1; Sun, 4 Dec 2022 17:56:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176601; bh=5USbCND1vtOk+Ddksu9R9JsvT7SWTg3/FPRw82671DA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EuVr9EceeSC5RXnbNNcOV7WmoNP49TvSq/c1y641y/c3aLPstDSOA10kxutz2oxye 78t4fdFrWxrbdf4eNSzksFgdeyS6gyb5iFBGGsGDuAuVFMRRcWHZtZQYkVLQD6fRFO KzvLwbueerxNhEYscbvDOdVXreKg62e3PYNE01nlzLr142V83oWtYsfUjXSNL5wacT drSYC8nTXWv+ISPSjoqbtm7DE8sMgFDbE31SuF3XpPmiP8HAXM/KRSwXl8uud8oysO qpv/9cMI/OeEr/ouQ4SO6gNqnWeQT4n1aFSF91DyJcOPVyyj+FbyOjsG/gL0a4B5yL NGJcBmgqe56nA== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 29/32] Input: pxa27xx-keypad - allow build with COMPILE_TEST Date: Sun, 4 Dec 2022 18:08:38 +0000 Message-Id: <20221204180841.2211588-30-jic23@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221204180841.2211588-1-jic23@kernel.org> References: <20221204180841.2211588-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Jonathan Cameron Used to build test PM changes. Signed-off-by: Jonathan Cameron --- drivers/input/keyboard/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/input/keyboard/Kconfig b/drivers/input/keyboard/Kconfig index 39717a2e1757..1a949445f116 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig @@ -542,7 +542,7 @@ config KEYBOARD_PINEPHONE config KEYBOARD_PXA27x tristate "PXA27x/PXA3xx keypad support" - depends on PXA27x || PXA3xx || ARCH_MMP + depends on PXA27x || PXA3xx || ARCH_MMP || COMPILE_TEST select INPUT_MATRIXKMAP help Enable support for PXA27x/PXA3xx keypad controller. From patchwork Sun Dec 4 18:08:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 630977 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id F05FEC6377E for ; Sun, 4 Dec 2022 17:57:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230311AbiLDR5E (ORCPT ); Sun, 4 Dec 2022 12:57:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41636 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230313AbiLDR4s (ORCPT ); Sun, 4 Dec 2022 12:56:48 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBD27140CD for ; Sun, 4 Dec 2022 09:56:47 -0800 (PST) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id A4423B80B89 for ; Sun, 4 Dec 2022 17:56:46 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 753CBC433D7; Sun, 4 Dec 2022 17:56:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176605; bh=C3Qqjsr5mOVDXnjvLYCTzX1P+UCmIt8ADdw1UMIGVeg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mgyr5utLUO10F2xf9SQRs84UDVxkLZqRcxR+fpe+3JdgFz0ZYn6QGmMB0mTmpArUE EvN2kpPZFroUVjsFKTAIjJgPnWv6Jj55lvLl91X3ustwb97/OrsRQVljRqojpQat3R KC1lm6NnojajddihNEkKvvUrWxbvgEiHrlZVtCE5zfHgXwbefsAUP2EoS8sByXPNQk ZJlcDea95N0oq3mVHkKuUVqFPklFd7Dx7RyWjqjpFmHFyP6fYUq2fD6CvP2BRzA7qe gCUpnCuppzJaiYjMxV4m9qaRomvWsNHl0gjkkTSNk5LKEF2u7nojGuR6tkh9cLJ3pk I8/O8SUfEKu0Q== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Tomohiro Yoshidomi Subject: [PATCH 32/32] Input: pxspad: Fix unused data warning when force feedback not enabled. Date: Sun, 4 Dec 2022 18:08:41 +0000 Message-Id: <20221204180841.2211588-33-jic23@kernel.org> X-Mailer: git-send-email 2.38.1 In-Reply-To: <20221204180841.2211588-1-jic23@kernel.org> References: <20221204180841.2211588-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Jonathan Cameron The functions using this data were protected with Do the same for the data used only in those functions. Signed-off-by: Jonathan Cameron Cc: Tomohiro Yoshidomi --- drivers/input/joystick/psxpad-spi.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/input/joystick/psxpad-spi.c b/drivers/input/joystick/psxpad-spi.c index 2c395af13d42..de734a927b4d 100644 --- a/drivers/input/joystick/psxpad-spi.c +++ b/drivers/input/joystick/psxpad-spi.c @@ -44,6 +44,8 @@ static const u8 PSX_CMD_POLL[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + +#ifdef CONFIG_JOYSTICK_PSXPAD_SPI_FF /* 0x01, 0x43, 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00 */ static const u8 PSX_CMD_ENTER_CFG[] = { 0x80, 0xC2, 0x00, 0x80, 0x00, 0x00, 0x00, 0x00, 0x00 @@ -56,6 +58,7 @@ static const u8 PSX_CMD_EXIT_CFG[] = { static const u8 PSX_CMD_ENABLE_MOTOR[] = { 0x80, 0xB2, 0x00, 0x00, 0x80, 0xFF, 0xFF, 0xFF, 0xFF }; +#endif /* CONFIG_JOYSTICK_PSXPAD_SPI_FF */ struct psxpad { struct spi_device *spi;