From patchwork Sun Dec 4 18:08:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13063888 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 C9D02C47089 for ; Sun, 4 Dec 2022 17:56:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229917AbiLDR4M (ORCPT ); Sun, 4 Dec 2022 12:56:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230208AbiLDR4K (ORCPT ); Sun, 4 Dec 2022 12:56:10 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D20B140CD for ; Sun, 4 Dec 2022 09:56:09 -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 2DE97B80886 for ; Sun, 4 Dec 2022 17:56:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E26CCC433D6; Sun, 4 Dec 2022 17:56:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176566; bh=YGTA4QSvnnQhQd3OCvTlGUOYTIOmfeCOEY0AkWtOnjE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Dba3sMuw17Mhoe+eNVaR8b/zZAoetci9PYSh2RIP15UMWM7cRL4OIwN3yAQSzJxLp wTYSnlqDPXCsIFFYe5/6t116sOIkWSyvSIZBnzZ8EZvAtIiE/RSvWoUreuGWI1OW5l xm8E4sN+asfggvTJ0GZgtdr5yvYQ0QTYd9v9yaTLVsuu6mJTg/FQP56GMHwoWKtQWb 3FykCZQIn9faUzfFZ98JsobwjBeH6/tJ6OWAsgLjWBcW7AvzAqAnX4J0NYQER7ufH0 XwAjHD4sIpaS4dd2EuVomUnCEJ7pjhgpTUPzKfGtlHUnyCe694pRuadEG+GW0UZx4F pG49WWxc4/Aug== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Tomohiro Yoshidomi Subject: [PATCH 01/32] Input: pxspad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:10 +0000 Message-Id: <20221204180841.2211588-2-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 used 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: Tomohiro Yoshidomi --- drivers/input/joystick/psxpad-spi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/joystick/psxpad-spi.c b/drivers/input/joystick/psxpad-spi.c index a32656064f39..2c395af13d42 100644 --- a/drivers/input/joystick/psxpad-spi.c +++ b/drivers/input/joystick/psxpad-spi.c @@ -371,7 +371,7 @@ static int psxpad_spi_probe(struct spi_device *spi) return 0; } -static int __maybe_unused psxpad_spi_suspend(struct device *dev) +static int psxpad_spi_suspend(struct device *dev) { struct spi_device *spi = to_spi_device(dev); struct psxpad *pad = spi_get_drvdata(spi); @@ -381,7 +381,7 @@ static int __maybe_unused psxpad_spi_suspend(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(psxpad_spi_pm, psxpad_spi_suspend, NULL); +static DEFINE_SIMPLE_DEV_PM_OPS(psxpad_spi_pm, psxpad_spi_suspend, NULL); static const struct spi_device_id psxpad_spi_id[] = { { "psxpad-spi", 0 }, @@ -392,7 +392,7 @@ MODULE_DEVICE_TABLE(spi, psxpad_spi_id); static struct spi_driver psxpad_spi_driver = { .driver = { .name = "psxpad-spi", - .pm = &psxpad_spi_pm, + .pm = pm_sleep_ptr(&psxpad_spi_pm), }, .id_table = psxpad_spi_id, .probe = psxpad_spi_probe, 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: 13063891 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:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13063890 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 7B1BBC4321E for ; Sun, 4 Dec 2022 17:56:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230198AbiLDR4N (ORCPT ); Sun, 4 Dec 2022 12:56:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230208AbiLDR4M (ORCPT ); Sun, 4 Dec 2022 12:56:12 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C50C140D2 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 D7285B80B8D for ; Sun, 4 Dec 2022 17:56:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 94F15C433D6; Sun, 4 Dec 2022 17:56:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176569; bh=Anw1KIhTev3BF6tVyrUuETRFTSG+rjBk7qNfiy7pw2c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rJGuAFnYQzAe5PMXyBD6YYg8EWj2xcReqERZBcf0Kbe9unCBtBV1VfMOBoG2vTVbn VDlMcMYPg9Wlmqt+9TbPofZ7s3b6WhICMvTtFutspVxGuhRn58c9tVrvnlMUPRzKIs gkhhg8YxV3NQqRQS/iDxcT+yjNYnOLmFky9kwCu5BbmG3lbTiZ2lW99rzo4OR50YdL G1h7qe1QB0y2DzfykrZVqWKDEltzVQ4tJi1aogLkVrnnwvUkfCHbQs03zYfR7STdGf ORpsy7NDX4jErulC8wN+Ml/TsCpiexf0q7eQIUwyu4oTMnIojEJbMh1ez0PZ+APu5x EEqb1xjRtWBQA== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Stephen Boyd Subject: [PATCH 03/32] Input: cros-ec-keyb - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:12 +0000 Message-Id: <20221204180841.2211588-4-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: Stephen Boyd Reviewed-by: Stephen Boyd --- drivers/input/keyboard/cros_ec_keyb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/keyboard/cros_ec_keyb.c b/drivers/input/keyboard/cros_ec_keyb.c index c14136b733a9..6f435125ec03 100644 --- a/drivers/input/keyboard/cros_ec_keyb.c +++ b/drivers/input/keyboard/cros_ec_keyb.c @@ -415,7 +415,7 @@ static int cros_ec_keyb_query_switches(struct cros_ec_keyb *ckdev) * * Returns 0 if no error or -error upon error. */ -static __maybe_unused int cros_ec_keyb_resume(struct device *dev) +static int cros_ec_keyb_resume(struct device *dev) { struct cros_ec_keyb *ckdev = dev_get_drvdata(dev); @@ -760,7 +760,7 @@ static const struct of_device_id cros_ec_keyb_of_match[] = { MODULE_DEVICE_TABLE(of, cros_ec_keyb_of_match); #endif -static SIMPLE_DEV_PM_OPS(cros_ec_keyb_pm_ops, NULL, cros_ec_keyb_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(cros_ec_keyb_pm_ops, NULL, cros_ec_keyb_resume); static struct platform_driver cros_ec_keyb_driver = { .probe = cros_ec_keyb_probe, @@ -769,7 +769,7 @@ static struct platform_driver cros_ec_keyb_driver = { .name = "cros-ec-keyb", .of_match_table = of_match_ptr(cros_ec_keyb_of_match), .acpi_match_table = ACPI_PTR(cros_ec_keyb_acpi_match), - .pm = &cros_ec_keyb_pm_ops, + .pm = pm_sleep_ptr(&cros_ec_keyb_pm_ops), }, }; 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: 13063889 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: 13063893 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:15 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13063892 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 ABA2BC3A5A7 for ; Sun, 4 Dec 2022 17:56:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230281AbiLDR4P (ORCPT ); Sun, 4 Dec 2022 12:56:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230209AbiLDR4O (ORCPT ); Sun, 4 Dec 2022 12:56:14 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 301E6140CD 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 dfw.source.kernel.org (Postfix) with ESMTPS id C92D260EDC for ; Sun, 4 Dec 2022 17:56:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 70CCEC433D7; Sun, 4 Dec 2022 17:56:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176573; bh=C57XBgOiDjdkdqotpKYfKJSQyCNiNL4jZK190Z3LfZE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TMuOOG2EcABu39+sDMSuUmMiL54pSUyvyZWnsKnK8GCF+HUY5kY8CANHcK/XQfTW/ bUXaRY8KkIDau0lkaPxalT7v2SXYi1mPSSDc0NTd7mx6B3BRFClQmYvbBYcgQnd0Vp KYtRubpZ4RciHbMI4hNJZNxEKxE8HSbl7QTDTvJ0KeVslWo4SfBQlC2KerzyyH8EV6 f5K2icly2fRDckq6Q01dZANDg/PUl7vwcokheMcChsHPxvCs4N1kwFmIiwInlHv4kj mwiI2/dHNDS1C47qS2YI3deJ62rOLdhAE8pBXWaRvw4HGhCJbPX24VcOOd5Ijpny+y CHJq/Bo2+Ma6g== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 06/32] Input: gpio-keys - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:15 +0000 Message-Id: <20221204180841.2211588-7-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/gpio_keys.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index a5dc4ab87fa1..5496482a38c1 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c @@ -992,7 +992,7 @@ gpio_keys_disable_wakeup(struct gpio_keys_drvdata *ddata) } } -static int __maybe_unused gpio_keys_suspend(struct device *dev) +static int gpio_keys_suspend(struct device *dev) { struct gpio_keys_drvdata *ddata = dev_get_drvdata(dev); struct input_dev *input = ddata->input; @@ -1012,7 +1012,7 @@ static int __maybe_unused gpio_keys_suspend(struct device *dev) return 0; } -static int __maybe_unused gpio_keys_resume(struct device *dev) +static int gpio_keys_resume(struct device *dev) { struct gpio_keys_drvdata *ddata = dev_get_drvdata(dev); struct input_dev *input = ddata->input; @@ -1034,7 +1034,7 @@ static int __maybe_unused gpio_keys_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(gpio_keys_pm_ops, gpio_keys_suspend, gpio_keys_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(gpio_keys_pm_ops, gpio_keys_suspend, gpio_keys_resume); static void gpio_keys_shutdown(struct platform_device *pdev) { @@ -1050,7 +1050,7 @@ static struct platform_driver gpio_keys_device_driver = { .shutdown = gpio_keys_shutdown, .driver = { .name = "gpio-keys", - .pm = &gpio_keys_pm_ops, + .pm = pm_sleep_ptr(&gpio_keys_pm_ops), .of_match_table = gpio_keys_of_match, .dev_groups = gpio_keys_groups, } 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: 13063895 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:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13063894 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 180B3C4321E for ; Sun, 4 Dec 2022 17:56:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230268AbiLDR4S (ORCPT ); Sun, 4 Dec 2022 12:56:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41412 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229960AbiLDR4R (ORCPT ); Sun, 4 Dec 2022 12:56:17 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DCE34140CD for ; Sun, 4 Dec 2022 09:56:16 -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 79DCA60DEB for ; Sun, 4 Dec 2022 17:56:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3BFEC433D6; Sun, 4 Dec 2022 17:56:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176575; bh=7Vkbkwa2VGJ7g3SZ6ixVK9ZHktVllTsPZZe/aAxuBFs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=mB+jCtXJQwqebxc5T5WTqQhvPR4L0Jde1cXk1fEBjtyJ2WicrhOvyvRFueaFasrvx L8kgfYXfBGsjKGvTamYzx5FI1u3EGWMb4SX0UXXgag61/SCdQ7zz/KIak9qMgUFSgU 21Mug5U3fzEEZaMxsVyjKGlFsPHSNSCJicgJcIVg221zckJyLYcglnJxFi2Z3mhwp/ ZjGpuDq2c2PYEJpwqJ+pyG3OPp2N55dfLm5DgrgUcA9eyGU5jd9YRqNJI4uRz5oaS9 wvdSwi9Q4xhDVemkcwFM/EwLm6NcbAgQzAiNrSDVIu/tL3GxOw2BT6NIBNNI0dlg/y lpF0/4rdP6PLQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , =?utf-8?b?TWljaGFsIFZv?= =?utf-8?b?a8OhxI0=?= Subject: [PATCH 08/32] Input: mpr121-touchkey - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:17 +0000 Message-Id: <20221204180841.2211588-9-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: Michal Vokáč --- drivers/input/keyboard/mpr121_touchkey.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/keyboard/mpr121_touchkey.c b/drivers/input/keyboard/mpr121_touchkey.c index 4610ef55903c..74ad353462a3 100644 --- a/drivers/input/keyboard/mpr121_touchkey.c +++ b/drivers/input/keyboard/mpr121_touchkey.c @@ -340,7 +340,7 @@ static int mpr_touchkey_probe(struct i2c_client *client) return 0; } -static int __maybe_unused mpr_suspend(struct device *dev) +static int mpr_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); @@ -352,7 +352,7 @@ static int __maybe_unused mpr_suspend(struct device *dev) return 0; } -static int __maybe_unused mpr_resume(struct device *dev) +static int mpr_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct mpr121_touchkey *mpr121 = i2c_get_clientdata(client); @@ -366,7 +366,7 @@ static int __maybe_unused mpr_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(mpr121_touchkey_pm_ops, mpr_suspend, mpr_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(mpr121_touchkey_pm_ops, mpr_suspend, mpr_resume); static const struct i2c_device_id mpr121_id[] = { { "mpr121_touchkey", 0 }, @@ -385,7 +385,7 @@ MODULE_DEVICE_TABLE(of, mpr121_touchkey_dt_match_table); static struct i2c_driver mpr_touchkey_driver = { .driver = { .name = "mpr121", - .pm = &mpr121_touchkey_pm_ops, + .pm = pm_sleep_ptr(&mpr121_touchkey_pm_ops), .of_match_table = of_match_ptr(mpr121_touchkey_dt_match_table), }, .id_table = mpr121_id, From patchwork Sun Dec 4 18:08:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13063896 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 AE485C47089 for ; Sun, 4 Dec 2022 17:56:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229970AbiLDR4T (ORCPT ); Sun, 4 Dec 2022 12:56:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229960AbiLDR4S (ORCPT ); Sun, 4 Dec 2022 12:56:18 -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 320A7140CD for ; Sun, 4 Dec 2022 09:56:18 -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 CBA1D60DEB for ; Sun, 4 Dec 2022 17:56:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 52438C433C1; Sun, 4 Dec 2022 17:56:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176577; bh=r8D8Sd1WxQQUnUAbhdzbXR9bTkQGae2Mgvb+dbVYKiA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=p8y1TwgC26BKweWKqkGyBzclkrHthI6gwfQMgObONQbLuhkLQ6HE+FH+mpIAemngb WEcA4bp+MViao64LzbWiwFGT+RLVb5Exx44DMoKjRWZa8FeoKzKyxBqSd4eA4TJKTP 8wspfnvjmkiacB+J9lCUrKF/i9PA1LUsSyKdrLPtdkldOwG4sFRcQJHmGyBiMikVs9 OVdKyXarGubdrblUwe6qH7CvMqscQ2lsG762P4/XuZPTpIunx+Yx5Dw/8uhm5vl3vF YOwtsonLmMWcxTUbMrZVZtPEFHRY5Ebxfay79rSvJ6/MuuQVPZAZJucWC1KX/5ETh9 WC9iMHRdSMqyg== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Mattijs Korpershoek Subject: [PATCH 09/32] Input: mtk-pmic-keys - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:18 +0000 Message-Id: <20221204180841.2211588-10-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: Mattijs Korpershoek Reviewed-by: Mattijs Korpershoek --- drivers/input/keyboard/mtk-pmic-keys.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c index 9b34da0ec260..3d4ffa25e3df 100644 --- a/drivers/input/keyboard/mtk-pmic-keys.c +++ b/drivers/input/keyboard/mtk-pmic-keys.c @@ -231,7 +231,7 @@ static int mtk_pmic_key_setup(struct mtk_pmic_keys *keys, return 0; } -static int __maybe_unused mtk_pmic_keys_suspend(struct device *dev) +static int mtk_pmic_keys_suspend(struct device *dev) { struct mtk_pmic_keys *keys = dev_get_drvdata(dev); int index; @@ -247,7 +247,7 @@ static int __maybe_unused mtk_pmic_keys_suspend(struct device *dev) return 0; } -static int __maybe_unused mtk_pmic_keys_resume(struct device *dev) +static int mtk_pmic_keys_resume(struct device *dev) { struct mtk_pmic_keys *keys = dev_get_drvdata(dev); int index; @@ -263,8 +263,8 @@ static int __maybe_unused mtk_pmic_keys_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(mtk_pmic_keys_pm_ops, mtk_pmic_keys_suspend, - mtk_pmic_keys_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(mtk_pmic_keys_pm_ops, mtk_pmic_keys_suspend, + mtk_pmic_keys_resume); static const struct of_device_id of_mtk_pmic_keys_match_tbl[] = { { @@ -387,7 +387,7 @@ static struct platform_driver pmic_keys_pdrv = { .driver = { .name = "mtk-pmic-keys", .of_match_table = of_mtk_pmic_keys_match_tbl, - .pm = &mtk_pmic_keys_pm_ops, + .pm = pm_sleep_ptr(&mtk_pmic_keys_pm_ops), }, }; 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: 13063897 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:20 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13063898 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 5BA7EC4321E for ; Sun, 4 Dec 2022 17:56:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229960AbiLDR4v (ORCPT ); Sun, 4 Dec 2022 12:56:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41440 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229983AbiLDR4X (ORCPT ); Sun, 4 Dec 2022 12:56:23 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 61C14140D0 for ; Sun, 4 Dec 2022 09:56:22 -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 1A255B80B8D for ; Sun, 4 Dec 2022 17:56:21 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03034C433C1; Sun, 4 Dec 2022 17:56:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176579; bh=lNtXRtqMGslc3byALBZnfjx/EhEkMCwXUqmIRqPRA88=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fb6XAWLxJxqH6fzZSn+fiLGXbZ4MpLoGE7ysre2nvdCaI+sI1GP8HBdj7/2rEAJes UzOrD3ybNrTxneLIKqGxmbN0Ay8OgR3zCiyQhhDjp2MYC52etZ4fCYrDVnamR0D/tu vJWdNHcz6w4sDX1sDZhgr5Bz2Xd77y4qNGY3whUj1AdYvysqO9fhhytuGIXi3VR0cA H8x+aKO7yGcU03hQNRachwpN5xfuuvEfofPTIXiDwD7vpKmvSptYhlYez6gd/ReGbD T/wEru7ptpgRQTMesHx/x4BnbPwdcTSKdPNlJzwkidlH41DGF3jha72aG6a2bdBOl7 5VFLLmWT91jBQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 11/32] Input: spear-keyboard - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:20 +0000 Message-Id: <20221204180841.2211588-12-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/spear-keyboard.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/input/keyboard/spear-keyboard.c b/drivers/input/keyboard/spear-keyboard.c index 9838c79cb288..4bb7c533147c 100644 --- a/drivers/input/keyboard/spear-keyboard.c +++ b/drivers/input/keyboard/spear-keyboard.c @@ -284,7 +284,7 @@ static int spear_kbd_remove(struct platform_device *pdev) return 0; } -static int __maybe_unused spear_kbd_suspend(struct device *dev) +static int spear_kbd_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct spear_kbd *kbd = platform_get_drvdata(pdev); @@ -337,7 +337,7 @@ static int __maybe_unused spear_kbd_suspend(struct device *dev) return 0; } -static int __maybe_unused spear_kbd_resume(struct device *dev) +static int spear_kbd_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct spear_kbd *kbd = platform_get_drvdata(pdev); @@ -364,7 +364,8 @@ static int __maybe_unused spear_kbd_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(spear_kbd_pm_ops, spear_kbd_suspend, spear_kbd_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(spear_kbd_pm_ops, + spear_kbd_suspend, spear_kbd_resume); #ifdef CONFIG_OF static const struct of_device_id spear_kbd_id_table[] = { @@ -379,7 +380,7 @@ static struct platform_driver spear_kbd_driver = { .remove = spear_kbd_remove, .driver = { .name = "keyboard", - .pm = &spear_kbd_pm_ops, + .pm = pm_sleep_ptr(&spear_kbd_pm_ops), .of_match_table = of_match_ptr(spear_kbd_id_table), }, }; From patchwork Sun Dec 4 18:08:21 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13063914 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 046FEC4708D for ; Sun, 4 Dec 2022 17:57:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229983AbiLDR4v (ORCPT ); Sun, 4 Dec 2022 12:56:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41450 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230158AbiLDR4Z (ORCPT ); Sun, 4 Dec 2022 12:56:25 -0500 Received: from sin.source.kernel.org (sin.source.kernel.org [IPv6:2604:1380:40e1:4800::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B4FD9140CD 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 sin.source.kernel.org (Postfix) with ESMTPS id 087C8CE0BAD for ; Sun, 4 Dec 2022 17:56:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D44AC433D6; Sun, 4 Dec 2022 17:56:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176581; bh=dZpy/GJ340BdOCA7F3pmskMstdkhkITN4BXYoije6z4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ubGjBeWniol2/OkpEY6phtrSLBPui3vXv/Lc3LlDSnVlcZ0qwENMxRpcvtt+6lCVp out+fI754K640DU4xzlOjEJIcG22gPU5rol16cVa/ufjx04Hp/QBsD+2ykZXzPtL9E nyIroybbz0G9/Kwls5W+TjQuaeT0altKAjpUYqm+sMY6Qj1KvtmFn4+7ziO/f4+z6Q AGc/0y5xesQ8HYx3bp4322zOyfUXLuOr5lSTfdLq/J4ReLZCXBuZacWRXyzJhHRw8J SDljmKQiQH419qR1DBMoYh1eU8d+hmVP2AobjurBmbqbNpxgr8fBXl96rNMYb7OGUA qyS/oRfgrwLmQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Stephan Gerhold Subject: [PATCH 12/32] Input: tm2-touchkey - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:21 +0000 Message-Id: <20221204180841.2211588-13-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: Stephan Gerhold --- drivers/input/keyboard/tm2-touchkey.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/keyboard/tm2-touchkey.c b/drivers/input/keyboard/tm2-touchkey.c index 086aafaf0418..6627e65f06e5 100644 --- a/drivers/input/keyboard/tm2-touchkey.c +++ b/drivers/input/keyboard/tm2-touchkey.c @@ -297,7 +297,7 @@ static int tm2_touchkey_probe(struct i2c_client *client) return 0; } -static int __maybe_unused tm2_touchkey_suspend(struct device *dev) +static int tm2_touchkey_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct tm2_touchkey_data *touchkey = i2c_get_clientdata(client); @@ -308,7 +308,7 @@ static int __maybe_unused tm2_touchkey_suspend(struct device *dev) return 0; } -static int __maybe_unused tm2_touchkey_resume(struct device *dev) +static int tm2_touchkey_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct tm2_touchkey_data *touchkey = i2c_get_clientdata(client); @@ -323,8 +323,8 @@ static int __maybe_unused tm2_touchkey_resume(struct device *dev) return ret; } -static SIMPLE_DEV_PM_OPS(tm2_touchkey_pm_ops, - tm2_touchkey_suspend, tm2_touchkey_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(tm2_touchkey_pm_ops, + tm2_touchkey_suspend, tm2_touchkey_resume); static const struct i2c_device_id tm2_touchkey_id_table[] = { { TM2_TOUCHKEY_DEV_NAME, 0 }, @@ -353,7 +353,7 @@ MODULE_DEVICE_TABLE(of, tm2_touchkey_of_match); static struct i2c_driver tm2_touchkey_driver = { .driver = { .name = TM2_TOUCHKEY_DEV_NAME, - .pm = &tm2_touchkey_pm_ops, + .pm = pm_sleep_ptr(&tm2_touchkey_pm_ops), .of_match_table = of_match_ptr(tm2_touchkey_of_match), }, .probe_new = tm2_touchkey_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: 13063913 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:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13063916 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 32B8CC3A5A7 for ; Sun, 4 Dec 2022 17:57:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230286AbiLDR4y (ORCPT ); Sun, 4 Dec 2022 12:56:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41462 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230168AbiLDR40 (ORCPT ); Sun, 4 Dec 2022 12:56:26 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 017D3140D2 for ; Sun, 4 Dec 2022 09:56:25 -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 AFCDDB80B8D for ; Sun, 4 Dec 2022 17:56:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id ABF0EC433D7; Sun, 4 Dec 2022 17:56:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176583; bh=vTeqQ/FADlj6OHw9wfTnAZpdtyR+2INUfKAhCBkhRIM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bGRkBALpBM5lfUUeonHyxwUp17+l8mCPUTOPghI94NLKhaJzCNJbVgUqUtXmYhxtD riMU3PoSonNMD/I5XbHWwoffH43VWo3HEFyxVJjNR41Cq94k4SXdMaZKRtgcUhUrWp 5ZSCwODLEHc483hfCISto1VEZT6OvlEso4r6gsHf2IggpwSW1NDI+onAHSNa3MzKwp p8EtfxJPY2nWVmV/sdgi0QkiZaDlBoPUCb+2BrjHVABPgBBpN287oE49bvm4pZJ7UH YfdBCse08FktU093pRLznX2rpUQHjfqdX62AHMOpOPQ6YzU+gs+vOKV3PYmZ7cSIEI wcAFix3f1M5DQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 14/32] Input: lpc32xx-keys - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:23 +0000 Message-Id: <20221204180841.2211588-15-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/lpc32xx-keys.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/input/keyboard/lpc32xx-keys.c b/drivers/input/keyboard/lpc32xx-keys.c index 943aeeb0de79..911e1181cd6f 100644 --- a/drivers/input/keyboard/lpc32xx-keys.c +++ b/drivers/input/keyboard/lpc32xx-keys.c @@ -264,7 +264,6 @@ static int lpc32xx_kscan_probe(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP static int lpc32xx_kscan_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -302,10 +301,9 @@ static int lpc32xx_kscan_resume(struct device *dev) mutex_unlock(&input->mutex); return retval; } -#endif -static SIMPLE_DEV_PM_OPS(lpc32xx_kscan_pm_ops, lpc32xx_kscan_suspend, - lpc32xx_kscan_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(lpc32xx_kscan_pm_ops, lpc32xx_kscan_suspend, + lpc32xx_kscan_resume); static const struct of_device_id lpc32xx_kscan_match[] = { { .compatible = "nxp,lpc3220-key" }, @@ -317,7 +315,7 @@ static struct platform_driver lpc32xx_kscan_driver = { .probe = lpc32xx_kscan_probe, .driver = { .name = DRV_NAME, - .pm = &lpc32xx_kscan_pm_ops, + .pm = pm_sleep_ptr(&lpc32xx_kscan_pm_ops), .of_match_table = lpc32xx_kscan_match, } }; 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: 13063915 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: 13063917 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: 13063919 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:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13063918 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 8D4CEC63705 for ; Sun, 4 Dec 2022 17:57:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230292AbiLDR4z (ORCPT ); Sun, 4 Dec 2022 12:56:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41484 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230288AbiLDR4a (ORCPT ); Sun, 4 Dec 2022 12:56:30 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80859140CD 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 dfw.source.kernel.org (Postfix) with ESMTPS id 1AEBD60EE7 for ; Sun, 4 Dec 2022 17:56:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 90DABC433C1; Sun, 4 Dec 2022 17:56:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176588; bh=2WR9kOo0nY7FrtMJ1hCnsomQ+6lvIodIoy2y8BxPUyU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FrqI9cXcbZFTkX3L4alWa1YHpS/PyQ331z605Hj1Q1TEu4cY0lJvXdYpHpv/kZIri BXrGJFkOpKiOTmI/XfwdG2hYUq6xzqUxOIfcLd4sNXkXH5F2l0CwynR8Pf2oyJKNUD pX6Ct2dGEQIkJz3uX5TlDREthzd2EbHL5RhG8YKjn1MBo0a5v1Da1zXBdx0pdHQW1D STtXnEsgGM0WN2vLkTCXfLdk7AcoM6QjwZ5gCW21kvl4/liVMat+OuMGGs5fMtbykh BPBdHHUws6pYx1D/4skpIR4Yw+xTezn/Cfc5dsFuH/eQfvToBmtTOiY/p25AEzWMBK 2m1/orX/B0Jww== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Linus Walleij Subject: [PATCH 18/32] Input: nomadik-ske-keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:27 +0000 Message-Id: <20221204180841.2211588-19-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: Linus Walleij Acked-by: Linus Walleij --- drivers/input/keyboard/nomadik-ske-keypad.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/input/keyboard/nomadik-ske-keypad.c b/drivers/input/keyboard/nomadik-ske-keypad.c index 0d55a95347f1..970f2a671c2e 100644 --- a/drivers/input/keyboard/nomadik-ske-keypad.c +++ b/drivers/input/keyboard/nomadik-ske-keypad.c @@ -388,7 +388,6 @@ static int ske_keypad_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP static int ske_keypad_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -416,15 +415,14 @@ static int ske_keypad_resume(struct device *dev) return 0; } -#endif -static SIMPLE_DEV_PM_OPS(ske_keypad_dev_pm_ops, - ske_keypad_suspend, ske_keypad_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(ske_keypad_dev_pm_ops, + ske_keypad_suspend, ske_keypad_resume); static struct platform_driver ske_keypad_driver = { .driver = { .name = "nmk-ske-keypad", - .pm = &ske_keypad_dev_pm_ops, + .pm = pm_sleep_ptr(&ske_keypad_dev_pm_ops), }, .remove = ske_keypad_remove, }; From patchwork Sun Dec 4 18:08:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13063920 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 C49DFC63706 for ; Sun, 4 Dec 2022 17:57:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230288AbiLDR44 (ORCPT ); Sun, 4 Dec 2022 12:56:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230293AbiLDR4b (ORCPT ); Sun, 4 Dec 2022 12:56:31 -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 AAB2D140CD for ; Sun, 4 Dec 2022 09:56:30 -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 485EC60EDC for ; Sun, 4 Dec 2022 17:56:30 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E578BC433D6; Sun, 4 Dec 2022 17:56:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176589; bh=srjWXdPFJfvPJ/zI6w+DJeiqewJpTejo8GBm47iv9Fg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ZOz0F72lLx73D2zlKNJOq0MR2lMDcscw7l4UsdzUNcOHVJjMgeikfKx1kCr4eHWzC AWKU80VeXkQez123hx41Y2DgrmwxnFEX0HgDXuAZ8Fj11TQzcYaAbBWGsev+VAB4AD k4y3dwU6OZdTjZTqdJvV6tRdI0oW5ESLxkHjE7m0fvLcs3BDgJmuEEzvgZGHc+o6z0 UUMxJcqIOGBPgxkrHLBC9Q7elw8FxLMIkK23bn3y2QH7pXTivTmknrGmmN6zUY3IwJ 5Yf0Q5Z0WP0d2JpFsNwfbxjNg2O8uQvjaR64bIPknuD+ikd2SA8GYq4fxNm4nvr+KE hZ83l1klTX/Yg== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 19/32] Input: pmic8xxx-keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:28 +0000 Message-Id: <20221204180841.2211588-20-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/pmic8xxx-keypad.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/input/keyboard/pmic8xxx-keypad.c b/drivers/input/keyboard/pmic8xxx-keypad.c index 4766c5048ce2..26a005f9ace3 100644 --- a/drivers/input/keyboard/pmic8xxx-keypad.c +++ b/drivers/input/keyboard/pmic8xxx-keypad.c @@ -621,7 +621,6 @@ static int pmic8xxx_kp_probe(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP static int pmic8xxx_kp_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -661,10 +660,9 @@ static int pmic8xxx_kp_resume(struct device *dev) return 0; } -#endif -static SIMPLE_DEV_PM_OPS(pm8xxx_kp_pm_ops, - pmic8xxx_kp_suspend, pmic8xxx_kp_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(pm8xxx_kp_pm_ops, + pmic8xxx_kp_suspend, pmic8xxx_kp_resume); static const struct of_device_id pm8xxx_match_table[] = { { .compatible = "qcom,pm8058-keypad" }, @@ -677,7 +675,7 @@ static struct platform_driver pmic8xxx_kp_driver = { .probe = pmic8xxx_kp_probe, .driver = { .name = "pm8xxx-keypad", - .pm = &pm8xxx_kp_pm_ops, + .pm = pm_sleep_ptr(&pm8xxx_kp_pm_ops), .of_match_table = pm8xxx_match_table, }, }; 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: 13063921 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:30 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13063922 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 1A557C6370B for ; Sun, 4 Dec 2022 17:57:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230293AbiLDR44 (ORCPT ); Sun, 4 Dec 2022 12:56:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41520 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230296AbiLDR4d (ORCPT ); Sun, 4 Dec 2022 12:56:33 -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 C2C44140D2 for ; Sun, 4 Dec 2022 09:56:32 -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 A460160EE7 for ; Sun, 4 Dec 2022 17:56:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A462C433D6; Sun, 4 Dec 2022 17:56:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176592; bh=pqJfGsQ3XwlQtiiA8BbghJui3arS74gMf/3FN6Kc+5A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f9NrkQ+tifCU/FXfBgCUnGZl2iyrf6RIQRBRuMW4sf9l7Pxq9IOXoF8DT46+VR8ad u+g0WfhTRSK/AnOlz1fQM7M3iH09iYCpq+dMX8iOg/MtzlNjt7TDIUWqADUntntJbk 8mh5asR4aS57UFFLZVEYdKkhBpUncEVBQla497poyPtsVdUhTYZd6Q5AqAhjzJA01n zWNvzuPTUvvEXlmsfBkAvgsij0Uh2dd7s4g8TGHaKqFCITZ3lMAu9jqmUiv9fYsKnK +s6Zz7scbelRdp4KWG9JDoVj3UeqEXLHE3yMKOeAW3klsZBJxocHd1OHVAQlC6L1XK 2gJaK7kxlVVRA== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 21/32] Input: qt1070 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:30 +0000 Message-Id: <20221204180841.2211588-22-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/qt1070.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/input/keyboard/qt1070.c b/drivers/input/keyboard/qt1070.c index 533bb0375223..fabb50bde844 100644 --- a/drivers/input/keyboard/qt1070.c +++ b/drivers/input/keyboard/qt1070.c @@ -226,7 +226,6 @@ static void qt1070_remove(struct i2c_client *client) kfree(data); } -#ifdef CONFIG_PM_SLEEP static int qt1070_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); @@ -248,9 +247,8 @@ static int qt1070_resume(struct device *dev) return 0; } -#endif -static SIMPLE_DEV_PM_OPS(qt1070_pm_ops, qt1070_suspend, qt1070_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(qt1070_pm_ops, qt1070_suspend, qt1070_resume); static const struct i2c_device_id qt1070_id[] = { { "qt1070", 0 }, @@ -270,7 +268,7 @@ static struct i2c_driver qt1070_driver = { .driver = { .name = "qt1070", .of_match_table = of_match_ptr(qt1070_of_match), - .pm = &qt1070_pm_ops, + .pm = pm_sleep_ptr(&qt1070_pm_ops), }, .id_table = qt1070_id, .probe_new = qt1070_probe, From patchwork Sun Dec 4 18:08:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13063924 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 73ADCC6370E for ; Sun, 4 Dec 2022 17:57:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230347AbiLDR46 (ORCPT ); Sun, 4 Dec 2022 12:56:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41532 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230297AbiLDR4e (ORCPT ); Sun, 4 Dec 2022 12:56:34 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40813140D0 for ; Sun, 4 Dec 2022 09:56:34 -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 CFBF260EDC for ; Sun, 4 Dec 2022 17:56:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79189C433D7; Sun, 4 Dec 2022 17:56:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176593; bh=CnxH2NeO2cSF4u8gQi3M8DSZxK3l+bCBIn1JqqrbXhg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Ht1zLNC6BNUlDB5rpJNaYToUvP8mvjRNhte0uEdIwD7Zs37lZvK6IUTRpMwV0dq/0 UiamqMWnKph2sQFAs6QWZlGoj4/hWtNuKO+r01MPs1wMMsA9LRuuOPaAYWtO+FLHjH Hk7f8Tsa0OQywhrmYVs+D414mUJy0s3R/nt2cbEB2BOQEaNnmcDlMjXqHRlHJCy+Xn ZKCDZpSbmZt9QuMX6+ii+QG1W7me4AHIKdwUW/RDVynxYmHUSqQavxdQ/swYQeYttw ZA83S66T3H2VAchEeEpmkst3ZXWFGMorBzic4BFFxGGFkA1pZ1dPUrz2VvKk5j7J/7 1h0MXMlBwQPnw== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 22/32] Input: sh-keysc - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:31 +0000 Message-Id: <20221204180841.2211588-23-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/sh_keysc.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/input/keyboard/sh_keysc.c b/drivers/input/keyboard/sh_keysc.c index c155adebf96e..2c00320f739f 100644 --- a/drivers/input/keyboard/sh_keysc.c +++ b/drivers/input/keyboard/sh_keysc.c @@ -283,7 +283,6 @@ static int sh_keysc_remove(struct platform_device *pdev) return 0; } -#ifdef CONFIG_PM_SLEEP static int sh_keysc_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -316,17 +315,16 @@ static int sh_keysc_resume(struct device *dev) return 0; } -#endif -static SIMPLE_DEV_PM_OPS(sh_keysc_dev_pm_ops, - sh_keysc_suspend, sh_keysc_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(sh_keysc_dev_pm_ops, + sh_keysc_suspend, sh_keysc_resume); static struct platform_driver sh_keysc_device_driver = { .probe = sh_keysc_probe, .remove = sh_keysc_remove, .driver = { .name = "sh_keysc", - .pm = &sh_keysc_dev_pm_ops, + .pm = pm_sleep_ptr(&sh_keysc_dev_pm_ops), } }; module_platform_driver(sh_keysc_device_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: 13063923 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: 13063925 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:34 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13063930 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 E8631C6371A for ; Sun, 4 Dec 2022 17:57:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230361AbiLDR5A (ORCPT ); Sun, 4 Dec 2022 12:57:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230302AbiLDR4k (ORCPT ); Sun, 4 Dec 2022 12:56:40 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 85BA7140D0 for ; Sun, 4 Dec 2022 09:56:39 -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 39CE0B80B8C for ; Sun, 4 Dec 2022 17:56:38 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0D41CC433C1; Sun, 4 Dec 2022 17:56:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176597; bh=es+q7h2YGeWq9XshkCivTogjo/hEOQ+U4iQW7XOvkqw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M2qFLzW9XehAxz+qNkR9x3c/pkPjy4nTwriP3cIUKoBNboWNt5yhKXEFw4pEDonVb bCVpXp/2tekvyYzVLIudeNwDvuJ+oBxcKZWUGgTMMZUuE1JcDHw6g+xnkEKxeKMaBq de0Mlm6VLSMg7tpu8NwkMQlk8G3GF2Z3yfQjoJ3uPPQsG/IqZazqY1EYOa/2oD0Fy1 Ewu2cgzMb7AVAAXllJOdxDpfU0jeWrCrNhbLGsEhDeuUF7MraAORki0S9n972CkONy J+Gk5fmxpR9TfjqI7vOb9vlTWZi9PnFSDhQZ577sn3WbZgmgUQ+mESBTXzscp5urs6 yzmiDvUIlF8gA== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Linus Walleij Subject: [PATCH 25/32] Input: tca6416-keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Sun, 4 Dec 2022 18:08:34 +0000 Message-Id: <20221204180841.2211588-26-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: Linus Walleij --- drivers/input/keyboard/tca6416-keypad.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/input/keyboard/tca6416-keypad.c b/drivers/input/keyboard/tca6416-keypad.c index 281d9ec163cc..673b905af6fe 100644 --- a/drivers/input/keyboard/tca6416-keypad.c +++ b/drivers/input/keyboard/tca6416-keypad.c @@ -320,7 +320,6 @@ static void tca6416_keypad_remove(struct i2c_client *client) kfree(chip); } -#ifdef CONFIG_PM_SLEEP static int tca6416_keypad_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); @@ -342,15 +341,14 @@ static int tca6416_keypad_resume(struct device *dev) return 0; } -#endif -static SIMPLE_DEV_PM_OPS(tca6416_keypad_dev_pm_ops, - tca6416_keypad_suspend, tca6416_keypad_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(tca6416_keypad_dev_pm_ops, + tca6416_keypad_suspend, tca6416_keypad_resume); static struct i2c_driver tca6416_keypad_driver = { .driver = { .name = "tca6416-keypad", - .pm = &tca6416_keypad_dev_pm_ops, + .pm = pm_sleep_ptr(&tca6416_keypad_dev_pm_ops), }, .probe_new = tca6416_keypad_probe, .remove = tca6416_keypad_remove, 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: 13063929 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: 13063927 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:37 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13063926 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 C7E20C63716 for ; Sun, 4 Dec 2022 17:57:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230302AbiLDR5B (ORCPT ); Sun, 4 Dec 2022 12:57:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230306AbiLDR4m (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 29F90140D2 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 ams.source.kernel.org (Postfix) with ESMTPS id D071CB80B8E for ; Sun, 4 Dec 2022 17:56:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BB925C433D7; Sun, 4 Dec 2022 17:56:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176600; bh=9ZNztioYN8Es4L26nzCb/rarDJBUysAcnb5GkctwPog=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=u6XQjcaC3p2SOPBWid2SZzP5qXOD6UCNrvx4dabC3mBgTXLhnwI872mdnMuMW7P/u 5lK7PFo73FsW92047J1LsErCjs4Mui0ldlEffNMq9kZP2Kw0yytrjxeEnx+Bve0mie qxPnoUd8ttlQtfupuVQodegzLsfpRnAo0zOqttRy1IRX/l6A32ePro23l0z+rnAsUE 1lKr8WDYMvDiv226NcwEDk1D38EhMCvngcjNm61xKiOPEPPpRDsMOLMa9ObH2u5rO8 lAHEahjt6xTRGgLHQ74wUVY2+GsF/3eDnO1C/kwLOHhHai5/kQ2RFKSsCUUTVlgvmf VvfcYye4UsPLw== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 28/32] Input: spear-keyboard - improve build coverage using COMPILE_TEST Date: Sun, 4 Dec 2022 18:08:37 +0000 Message-Id: <20221204180841.2211588-29-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 test the 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 28a9ad8a1466..39717a2e1757 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig @@ -709,7 +709,7 @@ config KEYBOARD_OMAP4 config KEYBOARD_SPEAR tristate "ST SPEAR keyboard support" - depends on PLAT_SPEAR + depends on PLAT_SPEAR || COMPILE_TEST select INPUT_MATRIXKMAP help Say Y here if you want to use the SPEAR keyboard. 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: 13063931 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:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13063928 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 CB794C6371B for ; Sun, 4 Dec 2022 17:57:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230307AbiLDR5D (ORCPT ); Sun, 4 Dec 2022 12:57:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230308AbiLDR4q (ORCPT ); Sun, 4 Dec 2022 12:56:46 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7D050140D0 for ; Sun, 4 Dec 2022 09:56:45 -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 36644B80B89 for ; Sun, 4 Dec 2022 17:56:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1DD83C433D7; Sun, 4 Dec 2022 17:56:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176602; bh=M06wx+LNFiv20E9gjNs7DU6pLRQHN5vbeixul1/66Qw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Lu6ged76+3oGzzH5HPqbRxj92KtknePnRWq8/RYhTSkV+P9NwTi5APdtKJbW3umHP SgYrKAw46otmZNjL+kUkbmfOt470St2o197cYkOZXW5K9wrDMCzB650oSuqogCvT+g Jp5V6YCflZyrUSO5yuWoa5RpS7vx6FclYVCcyqwL4XQ+cQzWO6ZwZ7fDJTY+kW32wW A8S+cgX7vcOih+OhisV2wsYWnSV8PGAmyfTZHpE/EIYVVP4ycPG2Nudy3QRyJJj5sr WcAC+H+YUMXc+fFZNQgGbjS7gVP/j8x5GXI5ew3P0NTqgBHvqhndIM0iawdVMFeg83 GVcF5VyDQXgnQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 30/32] Input: nomadik-ske-keypad - allow building with COMPILE_TEST Date: Sun, 4 Dec 2022 18:08:39 +0000 Message-Id: <20221204180841.2211588-31-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 the 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 1a949445f116..3f232d727e31 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig @@ -487,7 +487,7 @@ config KEYBOARD_NEWTON config KEYBOARD_NOMADIK tristate "ST-Ericsson Nomadik SKE keyboard" - depends on (ARCH_NOMADIK || ARCH_U8500) + depends on (ARCH_NOMADIK || ARCH_U8500 || COMPILE_TEST) select INPUT_MATRIXKMAP help Say Y here if you want to use a keypad provided on the SKE controller From patchwork Sun Dec 4 18:08:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 13063932 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 3A96CC64E66 for ; Sun, 4 Dec 2022 17:57:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230308AbiLDR5E (ORCPT ); Sun, 4 Dec 2022 12:57:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230311AbiLDR4r (ORCPT ); Sun, 4 Dec 2022 12:56:47 -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 B2902140CD for ; Sun, 4 Dec 2022 09:56:46 -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 68957B80B8E for ; Sun, 4 Dec 2022 17:56:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4A128C4347C; Sun, 4 Dec 2022 17:56:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1670176604; bh=K+fSMOvuU2e10al0zWqvjQjWybt+yokjbg0Uk34WpBc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=f3TluiuDhVEEUDv83UOPSxzrAa9F+vPCrnkqKIEoSPMORPHyBTRLatE4gQ9XVy+un 533MJtsD8UNNZ5dyBlCa8ZC1C/QzDXtkWI29Mu8BkIhneVHOT01iHob+6wntDAYWq9 kdgK9Dtxm9RzZi0J8LKPlbZE0c9KLbzpVic7JKzpnvfXIECWsqJ7s1Yo+xp8foSVAm jds8UvmB+xjFcMriu9uRgT/kim7ZqPDQ0x4onxzgtuj/29wEaC6w3cwePmyxDQbqRe U6YQ/UVNuxVZRmocxnQkv86m0kYRFIL1IFXoubp/WBFOodNdUqWHms/k303jb+xtxT u3R8g0pZEbpxQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 31/32] Input: lpc32xx - allow building with COMPILE_TEST Date: Sun, 4 Dec 2022 18:08:40 +0000 Message-Id: <20221204180841.2211588-32-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 test the 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 3f232d727e31..84490915ae4d 100644 --- a/drivers/input/keyboard/Kconfig +++ b/drivers/input/keyboard/Kconfig @@ -390,7 +390,7 @@ config KEYBOARD_LOCOMO config KEYBOARD_LPC32XX tristate "LPC32XX matrix key scanner support" - depends on ARCH_LPC32XX && OF + depends on (ARCH_LPC32XX && OF) || COMPILE_TEST select INPUT_MATRIXKMAP help Say Y here if you want to use NXP LPC32XX SoC key scanner interface, 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: 13063933 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;