From patchwork Mon Jan 2 18:17:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639151 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 AE830C3DA7A for ; Mon, 2 Jan 2023 18:06:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234650AbjABSGI (ORCPT ); Mon, 2 Jan 2023 13:06:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47402 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231454AbjABSF5 (ORCPT ); Mon, 2 Jan 2023 13:05:57 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B0B2CDD4 for ; Mon, 2 Jan 2023 10:05:56 -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 4426761038 for ; Mon, 2 Jan 2023 18:05:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFF4FC433F1; Mon, 2 Jan 2023 18:05:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682755; bh=1/9diJ0LyAqf/5EINz6bE03sh0wkbD6nhUaZgN+4Kx8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PNVekfGTXGAzry4fUVR8Nj5ewZoObEx9shHqaDdY8e0EQXgfZdIOve1c0idkarDgv YRSX8hQWzhCrabJtr+i1G64PAnpF6UaQgap/ire9AArzZzDCoo+dGls84mLPCZQkgg ZNvaWoQ1in4hrmX63r7o2K9/7+xRk0WR9JMswJN3a+nnJD84QgUHT/fdRB1ilJ05Rc T/PwKGZjRpMrxxeIwziJDAi7G2gCBDxa7FmSeRw/jGaoYXG/H3F1dT4AcJZKP4wHYa hMyVjgSdoeBfobC6YyzVLT3uqPMSLJpZD8nBKSsnkNr9fAUDO9rJiUHolosZQxUvt+ fDpR1qpPsrpbw== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 01/69] Input: 88pm860x - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:34 +0000 Message-Id: <20230102181842.718010-2-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/misc/88pm860x_onkey.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/input/misc/88pm860x_onkey.c b/drivers/input/misc/88pm860x_onkey.c index 685995cad73f..0f8b7ffb3aff 100644 --- a/drivers/input/misc/88pm860x_onkey.c +++ b/drivers/input/misc/88pm860x_onkey.c @@ -110,7 +110,7 @@ static int pm860x_onkey_probe(struct platform_device *pdev) return 0; } -static int __maybe_unused pm860x_onkey_suspend(struct device *dev) +static int pm860x_onkey_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent); @@ -119,7 +119,7 @@ static int __maybe_unused pm860x_onkey_suspend(struct device *dev) chip->wakeup_flag |= 1 << PM8607_IRQ_ONKEY; return 0; } -static int __maybe_unused pm860x_onkey_resume(struct device *dev) +static int pm860x_onkey_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct pm860x_chip *chip = dev_get_drvdata(pdev->dev.parent); @@ -129,12 +129,13 @@ static int __maybe_unused pm860x_onkey_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(pm860x_onkey_pm_ops, pm860x_onkey_suspend, pm860x_onkey_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(pm860x_onkey_pm_ops, + pm860x_onkey_suspend, pm860x_onkey_resume); static struct platform_driver pm860x_onkey_driver = { .driver = { .name = "88pm860x-onkey", - .pm = &pm860x_onkey_pm_ops, + .pm = pm_sleep_ptr(&pm860x_onkey_pm_ops), }, .probe = pm860x_onkey_probe, }; From patchwork Mon Jan 2 18:17:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638661 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 C3CC7C4708D for ; Mon, 2 Jan 2023 18:06:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232655AbjABSGJ (ORCPT ); Mon, 2 Jan 2023 13:06:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46862 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232796AbjABSF6 (ORCPT ); Mon, 2 Jan 2023 13:05:58 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0B74C38BD for ; Mon, 2 Jan 2023 10:05:58 -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 98B5661057 for ; Mon, 2 Jan 2023 18:05:57 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1181DC433D2; Mon, 2 Jan 2023 18:05:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682757; bh=NOjTjtn7k7niayHti6GiZtzoE7yUz0hY1RduihXBHEU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=nwy9dDI6Q/+TmsnmXKaAK2BVVFcsLPUw1dQIxcvNSVjNZmL/tvMtCCTM/PWlbYkRu GnnVhz7QlpX+NVO3qLgK5gXCfUBW0G580lKIhs3ajOKyYd0RDqlT9LhLHyShIBXlYx TsJPOJ1Qz9fUCugn0OU5EeutcQrDNnxWG6znUqOcbroLXjotQi6gGj5tNubcHXo1bn XbxU/D/ZBH/e7ZeJ/LNef25NFHNza9XcrajNLujXrxsSj25WAsSvn+H78T3lM5NOLu Rs6j/DQTMq5ML/5Mq3DxEI5phbll2yp4nZqN9to6J/D1Fo+GOo+MHnpdSmeeKtHt4A tYmGSsZUqh9eQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Roy Im Subject: [PATCH 02/69] Input: da7280 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:35 +0000 Message-Id: <20230102181842.718010-3-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Roy Im --- drivers/input/misc/da7280.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/misc/da7280.c b/drivers/input/misc/da7280.c index dcdea33b1a8f..b85a19e3554f 100644 --- a/drivers/input/misc/da7280.c +++ b/drivers/input/misc/da7280.c @@ -1260,7 +1260,7 @@ static int da7280_probe(struct i2c_client *client) return 0; } -static int __maybe_unused da7280_suspend(struct device *dev) +static int da7280_suspend(struct device *dev) { struct da7280_haptic *haptics = dev_get_drvdata(dev); @@ -1281,7 +1281,7 @@ static int __maybe_unused da7280_suspend(struct device *dev) return 0; } -static int __maybe_unused da7280_resume(struct device *dev) +static int da7280_resume(struct device *dev) { struct da7280_haptic *haptics = dev_get_drvdata(dev); int retval; @@ -1313,13 +1313,13 @@ static const struct i2c_device_id da7280_i2c_id[] = { }; MODULE_DEVICE_TABLE(i2c, da7280_i2c_id); -static SIMPLE_DEV_PM_OPS(da7280_pm_ops, da7280_suspend, da7280_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(da7280_pm_ops, da7280_suspend, da7280_resume); static struct i2c_driver da7280_driver = { .driver = { .name = "da7280", .of_match_table = of_match_ptr(da7280_of_match), - .pm = &da7280_pm_ops, + .pm = pm_sleep_ptr(&da7280_pm_ops), }, .probe_new = da7280_probe, .id_table = da7280_i2c_id, From patchwork Mon Jan 2 18:17:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638660 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 5209BC3DA7A for ; Mon, 2 Jan 2023 18:06:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235138AbjABSGK (ORCPT ); Mon, 2 Jan 2023 13:06:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46376 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236234AbjABSGB (ORCPT ); Mon, 2 Jan 2023 13:06:01 -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 CE22D617D for ; Mon, 2 Jan 2023 10:06:00 -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 82AE3B80D0B for ; Mon, 2 Jan 2023 18:05:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6ABD0C433F0; Mon, 2 Jan 2023 18:05:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682758; bh=HfQ8v+XO30mtsqWpzBIevpeQiIwtO+//GCpN5kTP3Bs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=euS3qdsDwoHtE3gGByb62CA3acRrWbWxK2EmONqm24rlExoCmzwNlOwrDMI0CI5Xl 4VJTjXnp8UYd5QHIFxOrom8svMWO4sXKiprdIBocdtjnk8TY2LqL0pWQGWKshqCrlg qQqJJBSD3Kck++r6qEcG2usIOIBN2KWK5PZvK5qqDtEqUdHXRTmngc2JxnEYrpvHaI 9zdegcViVMHOjcjQcdpsfyRYVu/hLD7IkaJEIls7qNE0kbnfp1Yo55ABLiLMdrU4aD 6WczLdTo8nzQZQeh6wjW4icP0lK6pLAG9c98fbXe8CYlXooxuyLuHVniL/rgXv3OFA RH5mdlWrEuY4w== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 03/69] Input: drv260x - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:36 +0000 Message-Id: <20230102181842.718010-4-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/misc/drv260x.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/misc/drv260x.c b/drivers/input/misc/drv260x.c index 3a51ee5e935a..8a9ebfc04a2d 100644 --- a/drivers/input/misc/drv260x.c +++ b/drivers/input/misc/drv260x.c @@ -572,7 +572,7 @@ static int drv260x_probe(struct i2c_client *client) return 0; } -static int __maybe_unused drv260x_suspend(struct device *dev) +static int drv260x_suspend(struct device *dev) { struct drv260x_data *haptics = dev_get_drvdata(dev); int ret = 0; @@ -604,7 +604,7 @@ static int __maybe_unused drv260x_suspend(struct device *dev) return ret; } -static int __maybe_unused drv260x_resume(struct device *dev) +static int drv260x_resume(struct device *dev) { struct drv260x_data *haptics = dev_get_drvdata(dev); int ret = 0; @@ -635,7 +635,7 @@ static int __maybe_unused drv260x_resume(struct device *dev) return ret; } -static SIMPLE_DEV_PM_OPS(drv260x_pm_ops, drv260x_suspend, drv260x_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(drv260x_pm_ops, drv260x_suspend, drv260x_resume); static const struct i2c_device_id drv260x_id[] = { { "drv2605l", 0 }, @@ -657,7 +657,7 @@ static struct i2c_driver drv260x_driver = { .driver = { .name = "drv260x-haptics", .of_match_table = drv260x_of_match, - .pm = &drv260x_pm_ops, + .pm = pm_sleep_ptr(&drv260x_pm_ops), }, .id_table = drv260x_id, }; From patchwork Mon Jan 2 18:17:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639149 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 66968C4708D for ; Mon, 2 Jan 2023 18:06:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232653AbjABSGK (ORCPT ); Mon, 2 Jan 2023 13:06:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47256 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235138AbjABSGB (ORCPT ); Mon, 2 Jan 2023 13:06:01 -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 772A960C5 for ; Mon, 2 Jan 2023 10:06:00 -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 F08EC6109A for ; Mon, 2 Jan 2023 18:05:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C10BC433EF; Mon, 2 Jan 2023 18:05:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682759; bh=RpASxQO8hYQF44I3ViaOfV66hxFacGo41eofHVSrXqs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TNQ3U5btw2AvvrkBuefvS3A5U0tR7cjwkCSk1cHrznsH3G9TB4PPABrILGgphNHQe DltKQfYWYlygASkAE7kSXj9zDyVMw601Ehtwve4oL5qzxJxKzt22fY/xViX2+vIn0F 0fXCZGMOamHns7tSdVtwWTsfJj+ZpyJkWHJApl0nO/1SUrcPWx9RaG7qSrquibg/E3 oz1vnzxf8INAWSmXE6NYmkWsIqUaVC33BjeHrFAXfapzoazqGqJOCVKeIek35PF0gB gMSNLUcqXz4KV24YH+mwzdXrwfkFv44uXuT/WVHzdPfevs3D11hH4QnRfy3oaMZ7Uw vhzMDe1/V2V8A== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 04/69] Input: drv2665 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:37 +0000 Message-Id: <20230102181842.718010-5-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/misc/drv2665.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/misc/drv2665.c b/drivers/input/misc/drv2665.c index c2a2ff980c06..9145096f80ea 100644 --- a/drivers/input/misc/drv2665.c +++ b/drivers/input/misc/drv2665.c @@ -222,7 +222,7 @@ static int drv2665_probe(struct i2c_client *client) return 0; } -static int __maybe_unused drv2665_suspend(struct device *dev) +static int drv2665_suspend(struct device *dev) { struct drv2665_data *haptics = dev_get_drvdata(dev); int ret = 0; @@ -251,7 +251,7 @@ static int __maybe_unused drv2665_suspend(struct device *dev) return ret; } -static int __maybe_unused drv2665_resume(struct device *dev) +static int drv2665_resume(struct device *dev) { struct drv2665_data *haptics = dev_get_drvdata(dev); int ret = 0; @@ -280,7 +280,7 @@ static int __maybe_unused drv2665_resume(struct device *dev) return ret; } -static SIMPLE_DEV_PM_OPS(drv2665_pm_ops, drv2665_suspend, drv2665_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(drv2665_pm_ops, drv2665_suspend, drv2665_resume); static const struct i2c_device_id drv2665_id[] = { { "drv2665", 0 }, @@ -301,7 +301,7 @@ static struct i2c_driver drv2665_driver = { .driver = { .name = "drv2665-haptics", .of_match_table = of_match_ptr(drv2665_of_match), - .pm = &drv2665_pm_ops, + .pm = pm_sleep_ptr(&drv2665_pm_ops), }, .id_table = drv2665_id, }; From patchwork Mon Jan 2 18:17:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638659 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 88825C4708E for ; Mon, 2 Jan 2023 18:06:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236234AbjABSGL (ORCPT ); Mon, 2 Jan 2023 13:06:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234558AbjABSGC (ORCPT ); Mon, 2 Jan 2023 13:06:02 -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 98983626A for ; Mon, 2 Jan 2023 10:06:01 -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 37CBD61093 for ; Mon, 2 Jan 2023 18:06:01 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CAF2EC433F0; Mon, 2 Jan 2023 18:05:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682760; bh=l2NcdvkQRpDh5XF6l2Oj+NMh4/PHJMd27ZIIZThO760=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=KCEu37yWojvITireKnBs7biaIKaj7H/K9UM1JNxoGLtmKbSrcQ+wkPN2yEP64K1/N 5TYsrkx67JLAQMMviXmwvJTGeZEOLssGtDgrAHyidHQmDCCRgfCChxRpdpke28+TBb 0A5LyTIIt1O2Z8DWXPePhVwXfMkWY6YeT65RIpFtQ4sJ7NyG1QcAABdGwRGj9c+ZNw Ta0szeBHe5NyI+siywM1o/Q0QwcNXvtH37K353lLwvWszPY5CSDc6h28rePS83QJDC 6jwfIrWx8fVJTYE7nNhKzCTG3Eycf0D9XeHevdVCVIAB5xYK/fWSOriaw+JzPMpJUm EkVjpTwd9JDnw== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 05/69] Input: drv2667 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:38 +0000 Message-Id: <20230102181842.718010-6-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/misc/drv2667.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/misc/drv2667.c b/drivers/input/misc/drv2667.c index da7ac63dce4c..88b4dbe3e5b5 100644 --- a/drivers/input/misc/drv2667.c +++ b/drivers/input/misc/drv2667.c @@ -399,7 +399,7 @@ static int drv2667_probe(struct i2c_client *client) return 0; } -static int __maybe_unused drv2667_suspend(struct device *dev) +static int drv2667_suspend(struct device *dev) { struct drv2667_data *haptics = dev_get_drvdata(dev); int ret = 0; @@ -428,7 +428,7 @@ static int __maybe_unused drv2667_suspend(struct device *dev) return ret; } -static int __maybe_unused drv2667_resume(struct device *dev) +static int drv2667_resume(struct device *dev) { struct drv2667_data *haptics = dev_get_drvdata(dev); int ret = 0; @@ -457,7 +457,7 @@ static int __maybe_unused drv2667_resume(struct device *dev) return ret; } -static SIMPLE_DEV_PM_OPS(drv2667_pm_ops, drv2667_suspend, drv2667_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(drv2667_pm_ops, drv2667_suspend, drv2667_resume); static const struct i2c_device_id drv2667_id[] = { { "drv2667", 0 }, @@ -478,7 +478,7 @@ static struct i2c_driver drv2667_driver = { .driver = { .name = "drv2667-haptics", .of_match_table = of_match_ptr(drv2667_of_match), - .pm = &drv2667_pm_ops, + .pm = pm_sleep_ptr(&drv2667_pm_ops), }, .id_table = drv2667_id, }; From patchwork Mon Jan 2 18:17:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639148 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 75D37C53210 for ; Mon, 2 Jan 2023 18:06:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234558AbjABSGL (ORCPT ); Mon, 2 Jan 2023 13:06:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236298AbjABSGF (ORCPT ); Mon, 2 Jan 2023 13:06:05 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ADE5FBF54 for ; Mon, 2 Jan 2023 10:06:04 -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 68BC1B80D0D for ; Mon, 2 Jan 2023 18:06:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1BA25C433EF; Mon, 2 Jan 2023 18:06:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682762; bh=yTeszxuvQgDKdYT0ragnF3gBuF2JkNE+uL9JVBLje98=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kFQuUNicUmbVfjIMNqIRCMVxs/t3iiIOQMDmrWU/ZG4Uju5Mxz3LYFPDkt9j5tqbi BVJ3aN714lD4b2LDPI3FtFosHN1ANfrWUDNcQBEdI3vH4o7YkKzeElbPfQALnmEUej qmioTzA/RLO70omYgvcPK8NCbrlr+t9arqnIc1sTv/5GNdHp+lN1jLAhiwQSrv/lr2 8meT1wjSYZ5ekq3VSZfvElIkMMlRH5nq40ozHjZilL5Wn0nU5g3h6xFZ6OKAyWdTMs PCwJPqNLGOe8bKCW8pDtvXJH4Y6Fi6gqXoqIK7CZ2jfTfPtnx3jBBwRwdNMo6EFagZ /sw2pp5eB6f1A== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Moritz Fischer Subject: [PATCH 06/69] Input: e3x0-button - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:39 +0000 Message-Id: <20230102181842.718010-7-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Moritz Fischer --- drivers/input/misc/e3x0-button.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/misc/e3x0-button.c b/drivers/input/misc/e3x0-button.c index e2fde6e1553f..5bd527117470 100644 --- a/drivers/input/misc/e3x0-button.c +++ b/drivers/input/misc/e3x0-button.c @@ -35,7 +35,7 @@ static irqreturn_t e3x0_button_press_handler(int irq, void *data) return IRQ_HANDLED; } -static int __maybe_unused e3x0_button_suspend(struct device *dev) +static int e3x0_button_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -45,7 +45,7 @@ static int __maybe_unused e3x0_button_suspend(struct device *dev) return 0; } -static int __maybe_unused e3x0_button_resume(struct device *dev) +static int e3x0_button_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); @@ -55,8 +55,8 @@ static int __maybe_unused e3x0_button_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(e3x0_button_pm_ops, - e3x0_button_suspend, e3x0_button_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(e3x0_button_pm_ops, + e3x0_button_suspend, e3x0_button_resume); static int e3x0_button_probe(struct platform_device *pdev) { @@ -122,7 +122,7 @@ static struct platform_driver e3x0_button_driver = { .driver = { .name = "e3x0-button", .of_match_table = of_match_ptr(e3x0_button_match), - .pm = &e3x0_button_pm_ops, + .pm = pm_sleep_ptr(&e3x0_button_pm_ops), }, .probe = e3x0_button_probe, }; From patchwork Mon Jan 2 18:17:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638658 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 6F7B9C3DA7A for ; Mon, 2 Jan 2023 18:07:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235115AbjABSGm (ORCPT ); Mon, 2 Jan 2023 13:06:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236345AbjABSGH (ORCPT ); Mon, 2 Jan 2023 13:06:07 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 40DB81EB for ; Mon, 2 Jan 2023 10:06:06 -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 DF3AAB80DDA for ; Mon, 2 Jan 2023 18:06:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 96F73C433F0; Mon, 2 Jan 2023 18:06:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682763; bh=e6fSDwGHrvPz/dbKrwaEMDSrhsskXvC36J7txtGN0sw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NXBtha5h7eYmNDauqoFNDJ/dPf2D9xuox0xH7C7bY2y44qATedsoRwDu3D76WsCEx wYLITAiRQqD2ZksXAhN8ZQTqjIUchbcSh0Y0Kl5y7vk9twnJId46FsnAf4NhzEyDZv NYZVv4Hk0CXvghCOkuGANrGHjXCi6t4ECF+iuAj012t95IAI7SJd902/VAestNYuB7 zjMvIrbsfJBm03fyJUJ4iej8SDYrAlbmXWETxSriogUSJSr19zlIJeO/vwlDSH3PSC FpiiW+J9vGrm9VemaT5gbXvpiKwIZi8MPRxQYXvIBD/EZMxeSeh1UTiyn0tBtke1ct qU4uFp6cRKZ9Q== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Luca Weiss Subject: [PATCH 07/69] Input: gpio-vibra - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:40 +0000 Message-Id: <20230102181842.718010-8-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Luca Weiss Reviewed-by: Luca Weiss --- drivers/input/misc/gpio-vibra.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/misc/gpio-vibra.c b/drivers/input/misc/gpio-vibra.c index f79f75595dd7..134a1309ba92 100644 --- a/drivers/input/misc/gpio-vibra.c +++ b/drivers/input/misc/gpio-vibra.c @@ -157,7 +157,7 @@ static int gpio_vibrator_probe(struct platform_device *pdev) return 0; } -static int __maybe_unused gpio_vibrator_suspend(struct device *dev) +static int gpio_vibrator_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct gpio_vibrator *vibrator = platform_get_drvdata(pdev); @@ -169,7 +169,7 @@ static int __maybe_unused gpio_vibrator_suspend(struct device *dev) return 0; } -static int __maybe_unused gpio_vibrator_resume(struct device *dev) +static int gpio_vibrator_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct gpio_vibrator *vibrator = platform_get_drvdata(pdev); @@ -180,8 +180,8 @@ static int __maybe_unused gpio_vibrator_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(gpio_vibrator_pm_ops, - gpio_vibrator_suspend, gpio_vibrator_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(gpio_vibrator_pm_ops, + gpio_vibrator_suspend, gpio_vibrator_resume); #ifdef CONFIG_OF static const struct of_device_id gpio_vibra_dt_match_table[] = { @@ -195,7 +195,7 @@ static struct platform_driver gpio_vibrator_driver = { .probe = gpio_vibrator_probe, .driver = { .name = "gpio-vibrator", - .pm = &gpio_vibrator_pm_ops, + .pm = pm_sleep_ptr(&gpio_vibrator_pm_ops), .of_match_table = of_match_ptr(gpio_vibra_dt_match_table), }, }; From patchwork Mon Jan 2 18:17:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639147 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 5ED72C4708E for ; Mon, 2 Jan 2023 18:07:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232791AbjABSGl (ORCPT ); Mon, 2 Jan 2023 13:06:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236341AbjABSGG (ORCPT ); Mon, 2 Jan 2023 13:06:06 -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 E1945B864 for ; Mon, 2 Jan 2023 10:06:05 -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 7C6F261038 for ; Mon, 2 Jan 2023 18:06:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 00C53C433EF; Mon, 2 Jan 2023 18:06:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682764; bh=48X3gboWU9P9WuSgH/w8NQHXmTlL1ep2bZ4rwTZotP4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Rd7dvOop7ABUNAJPNkr4D+3GI+9VNubiCymHgoKWz/buO2663Okl8dHN9L+C2c1f/ WGrqT75mI+pWa8hamEXo/KhY726ITLfnxIn30QR8rIwhqr9QsQvN/BzrmqPRguyg6U wsbu2OXBpj3AHAaGr0xnx1B7wtjAgMYN6Ze/WpL5P5MwlA5UEkFnRBb/P+eW+7nece 6H+2cyGhoNZ8KZ9yPjqsllo9EdANnkgQdtzilX6tWRWDg3QlAxW225eGtKspzUqxSQ rLuhZy3NaZ7fEPhnEm7zONqJ2YfvC8HUghFq5yKvumMwcbJJJOcStGZDBanrbfPcAU jJLw4eUMhkvng== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Jeff LaBundy Subject: [PATCH 08/69] Input: iqs269a - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:41 +0000 Message-Id: <20230102181842.718010-9-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Jeff LaBundy --- drivers/input/misc/iqs269a.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/misc/iqs269a.c b/drivers/input/misc/iqs269a.c index a348247d3d38..8348d8c85e1d 100644 --- a/drivers/input/misc/iqs269a.c +++ b/drivers/input/misc/iqs269a.c @@ -1697,7 +1697,7 @@ static int iqs269_probe(struct i2c_client *client) return error; } -static int __maybe_unused iqs269_suspend(struct device *dev) +static int iqs269_suspend(struct device *dev) { struct iqs269_private *iqs269 = dev_get_drvdata(dev); struct i2c_client *client = iqs269->client; @@ -1756,7 +1756,7 @@ static int __maybe_unused iqs269_suspend(struct device *dev) return error; } -static int __maybe_unused iqs269_resume(struct device *dev) +static int iqs269_resume(struct device *dev) { struct iqs269_private *iqs269 = dev_get_drvdata(dev); struct i2c_client *client = iqs269->client; @@ -1803,7 +1803,7 @@ static int __maybe_unused iqs269_resume(struct device *dev) return error; } -static SIMPLE_DEV_PM_OPS(iqs269_pm, iqs269_suspend, iqs269_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(iqs269_pm, iqs269_suspend, iqs269_resume); static const struct of_device_id iqs269_of_match[] = { { .compatible = "azoteq,iqs269a" }, @@ -1815,7 +1815,7 @@ static struct i2c_driver iqs269_i2c_driver = { .driver = { .name = "iqs269a", .of_match_table = iqs269_of_match, - .pm = &iqs269_pm, + .pm = pm_sleep_ptr(&iqs269_pm), }, .probe_new = iqs269_probe, }; From patchwork Mon Jan 2 18:17:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638656 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 A5581C54E76 for ; Mon, 2 Jan 2023 18:07:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236353AbjABSGq (ORCPT ); Mon, 2 Jan 2023 13:06:46 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232796AbjABSGK (ORCPT ); Mon, 2 Jan 2023 13:06:10 -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 4A5B3DD4 for ; Mon, 2 Jan 2023 10:06:08 -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 57C6EB80D0B for ; Mon, 2 Jan 2023 18:06:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 55FC0C433D2; Mon, 2 Jan 2023 18:06:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682766; bh=wp2ktGfZ0eg2QwSC98iKO5FSWIj7S0x2/HyeCPemldY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=gYPHAaVBqQKEqDARxI+y7AOqlyK9WY7kuVd1CvD4JS9q+CGvL0Ll6OAUMb+VWPsho GMewwRk+WawK1wAriDf7VH/xx6Znp0udmrMscRc/gYrMyNehncPSZKZEX6uwCwgK5v G+Ai7MmrtbXnf0zzH9ZpWKDNA1/k1aEVpWVNZxsAnb5vPxSsgCU8ZDQr+26n9rYMbt b/7H+cO5NaN0dfgs79wc6hp3br326DvGvYS+1YXvCPHZJFsxoftykhiT2DhVonio0+ +5EEeQV5PiqnI4rGBItkPGyA/0L/jMEOE0hV/Nhrv+Civh72M65mZcXf/bdw/ro6xU hoAe+1Itb3J4w== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 09/69] Input: iqs626a - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:42 +0000 Message-Id: <20230102181842.718010-10-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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 Reviewed-by: Jeff LaBundy --- drivers/input/misc/iqs626a.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/misc/iqs626a.c b/drivers/input/misc/iqs626a.c index 23b5dd9552dc..4727e6b95e41 100644 --- a/drivers/input/misc/iqs626a.c +++ b/drivers/input/misc/iqs626a.c @@ -1712,7 +1712,7 @@ static int iqs626_probe(struct i2c_client *client) return error; } -static int __maybe_unused iqs626_suspend(struct device *dev) +static int iqs626_suspend(struct device *dev) { struct iqs626_private *iqs626 = dev_get_drvdata(dev); struct i2c_client *client = iqs626->client; @@ -1771,7 +1771,7 @@ static int __maybe_unused iqs626_suspend(struct device *dev) return error; } -static int __maybe_unused iqs626_resume(struct device *dev) +static int iqs626_resume(struct device *dev) { struct iqs626_private *iqs626 = dev_get_drvdata(dev); struct i2c_client *client = iqs626->client; @@ -1818,7 +1818,7 @@ static int __maybe_unused iqs626_resume(struct device *dev) return error; } -static SIMPLE_DEV_PM_OPS(iqs626_pm, iqs626_suspend, iqs626_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(iqs626_pm, iqs626_suspend, iqs626_resume); static const struct of_device_id iqs626_of_match[] = { { .compatible = "azoteq,iqs626a" }, @@ -1830,7 +1830,7 @@ static struct i2c_driver iqs626_i2c_driver = { .driver = { .name = "iqs626a", .of_match_table = iqs626_of_match, - .pm = &iqs626_pm, + .pm = pm_sleep_ptr(&iqs626_pm), }, .probe_new = iqs626_probe, }; From patchwork Mon Jan 2 18:17:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638657 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 7E0DBC4708D for ; Mon, 2 Jan 2023 18:07:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232506AbjABSGo (ORCPT ); Mon, 2 Jan 2023 13:06:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236303AbjABSGL (ORCPT ); Mon, 2 Jan 2023 13:06:11 -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 D16E355BB for ; Mon, 2 Jan 2023 10:06: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 82CD7B80D0D for ; Mon, 2 Jan 2023 18:06:08 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8599FC433EF; Mon, 2 Jan 2023 18:06:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682767; bh=xHO8Iv4ZqtiCejPdA5Y2Q7wrp3IybCcMIqoV1cTvr10=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rUfI5FQrOGv/UWWJWLTVSm/b9uuIPVb7tEiMIlYfgB0Bfo+fqx3jM5pDmXlR/tRyC Hs2mpS1GcTVnkZTzsPcfdA2u20IumwahI/hcCtYiH+9ZsxELijPkZM20vr9ipvJ3zl mcRwD++OwbFB6vRnDbGZah8dbIn5MgxWQk3xS7FNY1RWfYPJUYasZXM7RBWH5ErrGq Svk2FxnF3qojGD61YDYCitf5YT0yui2chQnMgAna5D1PjVJ0gJ++/c1R69vwZozLmo dJk6SKV+1tPbFpfjktJYNo7ySIJnOwDnMGToHoz5l0GPhcUGckhZVIiiA+JOc8UxWv 6xpAYXRFGu9xQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 10/69] Input: kxtj9 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:43 +0000 Message-Id: <20230102181842.718010-11-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/misc/kxtj9.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/misc/kxtj9.c b/drivers/input/misc/kxtj9.c index 7e73e6e0730f..4e806d56c55d 100644 --- a/drivers/input/misc/kxtj9.c +++ b/drivers/input/misc/kxtj9.c @@ -494,7 +494,7 @@ static int kxtj9_probe(struct i2c_client *client) return 0; } -static int __maybe_unused kxtj9_suspend(struct device *dev) +static int kxtj9_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct kxtj9_data *tj9 = i2c_get_clientdata(client); @@ -509,7 +509,7 @@ static int __maybe_unused kxtj9_suspend(struct device *dev) return 0; } -static int __maybe_unused kxtj9_resume(struct device *dev) +static int kxtj9_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct kxtj9_data *tj9 = i2c_get_clientdata(client); @@ -524,7 +524,7 @@ static int __maybe_unused kxtj9_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(kxtj9_pm_ops, kxtj9_suspend, kxtj9_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(kxtj9_pm_ops, kxtj9_suspend, kxtj9_resume); static const struct i2c_device_id kxtj9_id[] = { { NAME, 0 }, @@ -536,7 +536,7 @@ MODULE_DEVICE_TABLE(i2c, kxtj9_id); static struct i2c_driver kxtj9_driver = { .driver = { .name = NAME, - .pm = &kxtj9_pm_ops, + .pm = pm_sleep_ptr(&kxtj9_pm_ops), }, .probe_new = kxtj9_probe, .id_table = kxtj9_id, From patchwork Mon Jan 2 18:17:44 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639145 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 6EDBDC53210 for ; Mon, 2 Jan 2023 18:07:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236307AbjABSGn (ORCPT ); Mon, 2 Jan 2023 13:06:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236361AbjABSGK (ORCPT ); Mon, 2 Jan 2023 13:06:10 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A1B65116B for ; Mon, 2 Jan 2023 10:06: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 dfw.source.kernel.org (Postfix) with ESMTPS id 3C6E36109E for ; Mon, 2 Jan 2023 18:06:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B14BBC433D2; Mon, 2 Jan 2023 18:06:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682768; bh=rB5/nHkFGyj35jSAxOJAtOMC42cp1lz66fm9KeMNI5Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ngjEWFRji/QKFl0reVNiTDOABjPskEdp84R8Yqpf+fhAjvr4qnFl3Mr7wuznuW3yO KXYdP/B+gfwo4iIYQ4Rgg7afxdIIqwqjA2MHWHwRzvOr4lN4WmQyoZxKXhYkSZi7DI H4hce9r7opqSsxf+V+rMeLkAhzS/CTOOFSm0s4A+qKu7mqoEAm24rPSzJN6cds6KnL 01CqdUIDHeW5/a+0iJvGWyRJOofNgSlQKLlZfAzIPcBkaTcRN2unj2AWcMKvNnszjG /G3wxrXxsix5yju3nxbxfg5LKFXIBv1cLNVKhU902HjhCkbgCXd1JutdFZKNWrei7W 3owahULmXrTLw== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Krzysztof Kozlowski Subject: [PATCH 11/69] Input: max77693-haptic - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:44 +0000 Message-Id: <20230102181842.718010-12-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Krzysztof Kozlowski --- drivers/input/misc/max77693-haptic.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/input/misc/max77693-haptic.c b/drivers/input/misc/max77693-haptic.c index 4369d3c04d38..80f4416ffe2f 100644 --- a/drivers/input/misc/max77693-haptic.c +++ b/drivers/input/misc/max77693-haptic.c @@ -375,7 +375,7 @@ static int max77693_haptic_probe(struct platform_device *pdev) return 0; } -static int __maybe_unused max77693_haptic_suspend(struct device *dev) +static int max77693_haptic_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct max77693_haptic *haptic = platform_get_drvdata(pdev); @@ -388,7 +388,7 @@ static int __maybe_unused max77693_haptic_suspend(struct device *dev) return 0; } -static int __maybe_unused max77693_haptic_resume(struct device *dev) +static int max77693_haptic_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct max77693_haptic *haptic = platform_get_drvdata(pdev); @@ -401,8 +401,9 @@ static int __maybe_unused max77693_haptic_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(max77693_haptic_pm_ops, - max77693_haptic_suspend, max77693_haptic_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(max77693_haptic_pm_ops, + max77693_haptic_suspend, + max77693_haptic_resume); static const struct platform_device_id max77693_haptic_id[] = { { "max77693-haptic", TYPE_MAX77693 }, @@ -414,7 +415,7 @@ MODULE_DEVICE_TABLE(platform, max77693_haptic_id); static struct platform_driver max77693_haptic_driver = { .driver = { .name = "max77693-haptic", - .pm = &max77693_haptic_pm_ops, + .pm = pm_sleep_ptr(&max77693_haptic_pm_ops), }, .probe = max77693_haptic_probe, .id_table = max77693_haptic_id, From patchwork Mon Jan 2 18:17:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639146 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 8E01AC54EBC for ; Mon, 2 Jan 2023 18:07:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236303AbjABSGp (ORCPT ); Mon, 2 Jan 2023 13:06:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47024 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236313AbjABSGN (ORCPT ); Mon, 2 Jan 2023 13:06:13 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 56E582CD for ; Mon, 2 Jan 2023 10:06: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 10848B80D0B for ; Mon, 2 Jan 2023 18:06:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0EED8C433F0; Mon, 2 Jan 2023 18:06:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682769; bh=SUXIjSXgaIalpRpwc0mafU/IbtWI52x8Vh5ylsyxOp4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sgdImx7wFO+xsA0OXjAPyyNJ3xh+y1yERsLzcFSZE/RGEs4Jno9AIPWyf2fTxYNkB CZDN/JQoWijA+SKKfNBBZFDAd8FwcqxQSfo1DX5XBqT7V0ab29i6pnv4Kv9eC7qq5U LV2iFOy4S1vKM4mqsh06kS6C3vuPrpKzW5qnjb0yGSC/hrhxlmiddd2rjME9ADUD6E lVZRM0zZjYHyKAeWjNJ1uRGhBogFgH5vvpMJYXEPPVZSpHUxlmp4H24kDdArCjauym E+XVEfNOFmngRvX4EO5ABbeRdTYJ49C75QiHmedAM/eSkwzDvMGomhuHCaYOlgqgkV YmgTObAz8iTew== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 12/69] Input: max8925_onkey - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:45 +0000 Message-Id: <20230102181842.718010-13-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/misc/max8925_onkey.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/input/misc/max8925_onkey.c b/drivers/input/misc/max8925_onkey.c index 4770cb55631a..62619e4fed20 100644 --- a/drivers/input/misc/max8925_onkey.c +++ b/drivers/input/misc/max8925_onkey.c @@ -129,7 +129,7 @@ static int max8925_onkey_probe(struct platform_device *pdev) return 0; } -static int __maybe_unused max8925_onkey_suspend(struct device *dev) +static int max8925_onkey_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct max8925_onkey_info *info = platform_get_drvdata(pdev); @@ -143,7 +143,7 @@ static int __maybe_unused max8925_onkey_suspend(struct device *dev) return 0; } -static int __maybe_unused max8925_onkey_resume(struct device *dev) +static int max8925_onkey_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct max8925_onkey_info *info = platform_get_drvdata(pdev); @@ -157,12 +157,13 @@ static int __maybe_unused max8925_onkey_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(max8925_onkey_pm_ops, max8925_onkey_suspend, max8925_onkey_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(max8925_onkey_pm_ops, + max8925_onkey_suspend, max8925_onkey_resume); static struct platform_driver max8925_onkey_driver = { .driver = { .name = "max8925-onkey", - .pm = &max8925_onkey_pm_ops, + .pm = pm_sleep_ptr(&max8925_onkey_pm_ops), }, .probe = max8925_onkey_probe, }; From patchwork Mon Jan 2 18:17:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638655 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 BADABC54EBF for ; Mon, 2 Jan 2023 18:07:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231716AbjABSGp (ORCPT ); Mon, 2 Jan 2023 13:06:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236298AbjABSGN (ORCPT ); Mon, 2 Jan 2023 13:06:13 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0779D13B for ; Mon, 2 Jan 2023 10:06: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 dfw.source.kernel.org (Postfix) with ESMTPS id 974826109A for ; Mon, 2 Jan 2023 18:06:11 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3ECC0C433F1; Mon, 2 Jan 2023 18:06:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682771; bh=lmqJgWMbi4NXarTWyOwsqOnQ1nXopq+uyJ9COLF+gYY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aHFZ5nZZWSVaCURJ39v68hiJ+hYMUIaIVagq1MIM7ldIYDy8jeBE9ujDwOBrLzbT9 5ks414m8hTgIpYlmtp0X3RpghAqcOUmkOThVsmBUsp0HIapHLiOQ9pSkYmLsde6fWJ w1X/IcxZZ0PqY1idt20NytmIQPOtiqcXy4aPXvDW47HzU2qoRdEgEZvHbZLckNrITl zN+9ci0Il4kAQO6k8yvVcIRo1eq06S0RSkwPF/dxRFxQ1Csep2JRc+CdIy5a7JTh2u 81zdC7HThCz6ELx4ttBRhWY1BgtED0WyWpO253sIWRrWDWxArNipsX4v49nRydDLKP MrhGeS23fkSKw== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 13/69] Input: max8997_haptic - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:46 +0000 Message-Id: <20230102181842.718010-14-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/misc/max8997_haptic.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/input/misc/max8997_haptic.c b/drivers/input/misc/max8997_haptic.c index 99cbc5ee89d1..c4dff476d479 100644 --- a/drivers/input/misc/max8997_haptic.c +++ b/drivers/input/misc/max8997_haptic.c @@ -366,7 +366,7 @@ static int max8997_haptic_remove(struct platform_device *pdev) return 0; } -static int __maybe_unused max8997_haptic_suspend(struct device *dev) +static int max8997_haptic_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct max8997_haptic *chip = platform_get_drvdata(pdev); @@ -376,7 +376,8 @@ static int __maybe_unused max8997_haptic_suspend(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(max8997_haptic_pm_ops, max8997_haptic_suspend, NULL); +static DEFINE_SIMPLE_DEV_PM_OPS(max8997_haptic_pm_ops, + max8997_haptic_suspend, NULL); static const struct platform_device_id max8997_haptic_id[] = { { "max8997-haptic", 0 }, @@ -387,7 +388,7 @@ MODULE_DEVICE_TABLE(platform, max8997_haptic_id); static struct platform_driver max8997_haptic_driver = { .driver = { .name = "max8997-haptic", - .pm = &max8997_haptic_pm_ops, + .pm = pm_sleep_ptr(&max8997_haptic_pm_ops), }, .probe = max8997_haptic_probe, .remove = max8997_haptic_remove, From patchwork Mon Jan 2 18:17:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639144 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 D9686C54EF1 for ; Mon, 2 Jan 2023 18:07:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232796AbjABSGr (ORCPT ); Mon, 2 Jan 2023 13:06:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236323AbjABSGO (ORCPT ); Mon, 2 Jan 2023 13:06:14 -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 5131CC25 for ; Mon, 2 Jan 2023 10:06:13 -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 E4D8C61057 for ; Mon, 2 Jan 2023 18:06:12 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6980FC433D2; Mon, 2 Jan 2023 18:06:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682772; bh=J3LJBoT6/HDUpx9uLtOS8a+86h+aDEO8uNeRqLJq5Jk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kzE7SEvxMWA2gDq34QOH/deKdL0EQBtwtWSHOBNXY2Oq79nivUe49Vgv0kL7I5+6h +UdBVyGJ/FBDNGDt7A8piFIZMrzw1ydPTyYIj40Et17so0CCfWFLhtfsuYPiuhPvn0 ns7BHDM3Cqc694mu15eoLFHejJPcIbfZLrZ5/3Pab3onsilB6YtetpYcKss9iMDnNn irgUiP7SMsacG8tYYbWNispWqU21t15KpKkLdJ14RQwET3QtNotZWv7QrXmmcESaCs YxqTh85zhCeUysNBf4luu+kqh/0g7vWbRPNXzdMGKgK0KwAwVFTfPYfSN6r3bvMUZ0 I2xj0HpIfcMTA== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Geert Uytterhoeven Subject: [PATCH 14/69] Input: palmas-pwrbutton - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:47 +0000 Message-Id: <20230102181842.718010-15-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Geert Uytterhoeven --- drivers/input/misc/palmas-pwrbutton.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/misc/palmas-pwrbutton.c b/drivers/input/misc/palmas-pwrbutton.c index 465e6693077a..7e361727b0d9 100644 --- a/drivers/input/misc/palmas-pwrbutton.c +++ b/drivers/input/misc/palmas-pwrbutton.c @@ -266,7 +266,7 @@ static int palmas_pwron_remove(struct platform_device *pdev) * * Return: 0 */ -static int __maybe_unused palmas_pwron_suspend(struct device *dev) +static int palmas_pwron_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct palmas_pwron *pwron = platform_get_drvdata(pdev); @@ -287,7 +287,7 @@ static int __maybe_unused palmas_pwron_suspend(struct device *dev) * * Return: 0 */ -static int __maybe_unused palmas_pwron_resume(struct device *dev) +static int palmas_pwron_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct palmas_pwron *pwron = platform_get_drvdata(pdev); @@ -298,8 +298,8 @@ static int __maybe_unused palmas_pwron_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(palmas_pwron_pm, - palmas_pwron_suspend, palmas_pwron_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(palmas_pwron_pm, + palmas_pwron_suspend, palmas_pwron_resume); #ifdef CONFIG_OF static const struct of_device_id of_palmas_pwr_match[] = { @@ -316,7 +316,7 @@ static struct platform_driver palmas_pwron_driver = { .driver = { .name = "palmas_pwrbutton", .of_match_table = of_match_ptr(of_palmas_pwr_match), - .pm = &palmas_pwron_pm, + .pm = pm_sleep_ptr(&palmas_pwron_pm), }, }; module_platform_driver(palmas_pwron_driver); From patchwork Mon Jan 2 18:17:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638654 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 CA407C54EBE for ; Mon, 2 Jan 2023 18:07:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236323AbjABSGr (ORCPT ); Mon, 2 Jan 2023 13:06:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49012 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236410AbjABSGP (ORCPT ); Mon, 2 Jan 2023 13:06:15 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8E72413B for ; Mon, 2 Jan 2023 10:06: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 2B93C61057 for ; Mon, 2 Jan 2023 18:06:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0B15C433F0; Mon, 2 Jan 2023 18:06:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682773; bh=5VLcsaZXDvy3xLFQdEdVLBMXMe2LcAIztX8IsNzrPyY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MCKfEYw+HLsmAP3UNm3P7tpKIIGUc1DSwKOHhZfU1/6xKCWoMeShEXPOKo36R7P5S kkF4+KTvOIFYDKEspwdoyNNN/38a5VDT87eZaijM5mTPXJzYUkZDy+07XZJScAtsax HbK0JviEDcksstNYcqacEOjp3LFOodRs+EaqJDbCzuyS9RoQM2OvY63lAzuMuKnmq7 I7n2h6ME4u1ISQxLcYFZCI57BcpMakgqnXxPcbBiivZNRL+DpM/3CNHH6HJAyUcuYt nkOTcLRX9pTm0H3uE7U+2XdEuyG/L9PPf4DBktwnC2NZGrj0Wc1DRGoiJaVxoB9I3X PqmflthgtnoqQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 15/69] Input: pcfg8574_keypad - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:48 +0000 Message-Id: <20230102181842.718010-16-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/misc/pcf8574_keypad.c | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) diff --git a/drivers/input/misc/pcf8574_keypad.c b/drivers/input/misc/pcf8574_keypad.c index fd1ff3f1cd92..6323c3d37ef7 100644 --- a/drivers/input/misc/pcf8574_keypad.c +++ b/drivers/input/misc/pcf8574_keypad.c @@ -167,7 +167,6 @@ static void pcf8574_kp_remove(struct i2c_client *client) kfree(lp); } -#ifdef CONFIG_PM static int pcf8574_kp_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); @@ -186,15 +185,8 @@ static int pcf8574_kp_suspend(struct device *dev) return 0; } -static const struct dev_pm_ops pcf8574_kp_pm_ops = { - .suspend = pcf8574_kp_suspend, - .resume = pcf8574_kp_resume, -}; - -#else -# define pcf8574_kp_resume NULL -# define pcf8574_kp_suspend NULL -#endif +static DEFINE_SIMPLE_DEV_PM_OPS(pcf8574_kp_pm_ops, + pcf8574_kp_suspend, pcf8574_kp_resume); static const struct i2c_device_id pcf8574_kp_id[] = { { DRV_NAME, 0 }, @@ -205,9 +197,7 @@ MODULE_DEVICE_TABLE(i2c, pcf8574_kp_id); static struct i2c_driver pcf8574_kp_driver = { .driver = { .name = DRV_NAME, -#ifdef CONFIG_PM - .pm = &pcf8574_kp_pm_ops, -#endif + .pm = pm_sleep_ptr(&pcf8574_kp_pm_ops), }, .probe_new = pcf8574_kp_probe, .remove = pcf8574_kp_remove, From patchwork Mon Jan 2 18:17:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638653 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 E8645C54EF0 for ; Mon, 2 Jan 2023 18:07:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236401AbjABSGs (ORCPT ); Mon, 2 Jan 2023 13:06:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49020 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236411AbjABSGS (ORCPT ); Mon, 2 Jan 2023 13:06:18 -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 744492E2 for ; Mon, 2 Jan 2023 10:06: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 29763B80D0D for ; Mon, 2 Jan 2023 18:06:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 03F96C433EF; Mon, 2 Jan 2023 18:06:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682774; bh=cJ0v3okXs+tO/Ws2wkgAookJbjJPjhab5+zfNFPGX5A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H5E87zFRibFI/LcD7YJRm1M0JKWgNPIDezAtE8mXoVvyI4U61r4nzCEB4RKw6MVAR 7KHnZengdPR7nA672Z0ahn6QXH0X6x/Ri6yujQWakx60UnuD0xbx6KuRFtv2jW/1a2 EYMzlyUym71b4fxPSmMv2KBO40qOQDsRmCzfeuvL7jpqSoMo+Vd2evXhgIEkhB3QmS dpnnh3QntcOLVLggpVNs8bH8eL95nJQWhOvQHbfcZI5xv5MnTJF/bG10pwh/TShVDF m8AFr+YB/mq6m08DdevHkSNxa7fFaQx6hDPubobrLCVLqTCzwfOmxkDi9goy6k6dXB k5bbhaW0RViBg== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Stephen Boyd Subject: [PATCH 16/69] Input: pm8941-pwrkey - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:49 +0000 Message-Id: <20230102181842.718010-17-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/misc/pm8941-pwrkey.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/misc/pm8941-pwrkey.c b/drivers/input/misc/pm8941-pwrkey.c index 549df01b6ee3..b6a27ebae977 100644 --- a/drivers/input/misc/pm8941-pwrkey.c +++ b/drivers/input/misc/pm8941-pwrkey.c @@ -217,7 +217,7 @@ static int pm8941_pwrkey_sw_debounce_init(struct pm8941_pwrkey *pwrkey) return 0; } -static int __maybe_unused pm8941_pwrkey_suspend(struct device *dev) +static int pm8941_pwrkey_suspend(struct device *dev) { struct pm8941_pwrkey *pwrkey = dev_get_drvdata(dev); @@ -227,7 +227,7 @@ static int __maybe_unused pm8941_pwrkey_suspend(struct device *dev) return 0; } -static int __maybe_unused pm8941_pwrkey_resume(struct device *dev) +static int pm8941_pwrkey_resume(struct device *dev) { struct pm8941_pwrkey *pwrkey = dev_get_drvdata(dev); @@ -237,8 +237,8 @@ static int __maybe_unused pm8941_pwrkey_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(pm8941_pwr_key_pm_ops, - pm8941_pwrkey_suspend, pm8941_pwrkey_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(pm8941_pwr_key_pm_ops, + pm8941_pwrkey_suspend, pm8941_pwrkey_resume); static int pm8941_pwrkey_probe(struct platform_device *pdev) { @@ -460,7 +460,7 @@ static struct platform_driver pm8941_pwrkey_driver = { .remove = pm8941_pwrkey_remove, .driver = { .name = "pm8941-pwrkey", - .pm = &pm8941_pwr_key_pm_ops, + .pm = pm_sleep_ptr(&pm8941_pwr_key_pm_ops), .of_match_table = of_match_ptr(pm8941_pwr_key_id_table), }, }; From patchwork Mon Jan 2 18:17:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638651 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 143E1C61DB3 for ; Mon, 2 Jan 2023 18:07:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236411AbjABSGs (ORCPT ); Mon, 2 Jan 2023 13:06:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49048 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236412AbjABSGT (ORCPT ); Mon, 2 Jan 2023 13:06:19 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EEDCA5F96 for ; Mon, 2 Jan 2023 10:06: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 ams.source.kernel.org (Postfix) with ESMTPS id 9E28FB80DDF for ; Mon, 2 Jan 2023 18:06:17 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 57F44C433D2; Mon, 2 Jan 2023 18:06:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682776; bh=kotcoLSZ8HkgZRPjZcnHoA6r3zLmIW7DIYRYJl4RVsI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=DFnXVOiCBoUBbJtaDCuUhsedr5K5x0ClEeJeqp4dTpvwqGyyw9eyURhM6mGzGr5cK ggliFu7RG2fykGHDbVxTq76PnaPLz0tHAnkcTmh/B/lvWeB/nOqRy7nx1H4RKhpL7e HiSZm1/sA6pBin8HtmwDhQRfcsItQdLzy6FVHtyyv0gy+KE6N2mVO+mge09i4zKezH 153GYQOiHxCsPpP/hdSqZm/3xoQH4vFPkBQOaGfXxH/9xfN+NolwcJdGVyupUJ9nRB KMuGQGI3I5zmTf59zy8inJ+u44on1bECo6qQ/TfmFOAV9axW8IY94kfpTL1ukOpyeM kW8TyMQnfw4HA== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Damien Riegel Subject: [PATCH 17/69] Input: pm8xxx-vibrator - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:50 +0000 Message-Id: <20230102181842.718010-18-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Damien Riegel --- drivers/input/misc/pm8xxx-vibrator.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/misc/pm8xxx-vibrator.c b/drivers/input/misc/pm8xxx-vibrator.c index 53ad25eaf1a2..04cb87efd799 100644 --- a/drivers/input/misc/pm8xxx-vibrator.c +++ b/drivers/input/misc/pm8xxx-vibrator.c @@ -226,7 +226,7 @@ static int pm8xxx_vib_probe(struct platform_device *pdev) return 0; } -static int __maybe_unused pm8xxx_vib_suspend(struct device *dev) +static int pm8xxx_vib_suspend(struct device *dev) { struct pm8xxx_vib *vib = dev_get_drvdata(dev); @@ -236,7 +236,7 @@ static int __maybe_unused pm8xxx_vib_suspend(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(pm8xxx_vib_pm_ops, pm8xxx_vib_suspend, NULL); +static DEFINE_SIMPLE_DEV_PM_OPS(pm8xxx_vib_pm_ops, pm8xxx_vib_suspend, NULL); static const struct of_device_id pm8xxx_vib_id_table[] = { { .compatible = "qcom,pm8058-vib", .data = &pm8058_regs }, @@ -250,7 +250,7 @@ static struct platform_driver pm8xxx_vib_driver = { .probe = pm8xxx_vib_probe, .driver = { .name = "pm8xxx-vib", - .pm = &pm8xxx_vib_pm_ops, + .pm = pm_sleep_ptr(&pm8xxx_vib_pm_ops), .of_match_table = pm8xxx_vib_id_table, }, }; From patchwork Mon Jan 2 18:17:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639143 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 03274C63705 for ; Mon, 2 Jan 2023 18:07:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235261AbjABSGt (ORCPT ); Mon, 2 Jan 2023 13:06:49 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49056 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236423AbjABSGU (ORCPT ); Mon, 2 Jan 2023 13:06:20 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E10CC25 for ; Mon, 2 Jan 2023 10:06:20 -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 CFFECB80DDE for ; Mon, 2 Jan 2023 18:06:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A9792C433EF; Mon, 2 Jan 2023 18:06:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682777; bh=oFc+PQl/9z4J6KHsg/Qo2TKXa4P5EbaXoA5U9NLooSk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=RJKcp1X+fy0TcFlFIiaFyD/uzzJcIK7+dwB5OVMnqlBnRNeYs2GArrI9dltPbgIT6 ljQ2miQBcbKuTIaPpFyEUzDjX6+KKF3kTxJE4o042XybMzsGHKALtNrd9MX2Ea1sP5 QaRfq7OPkI2aNBTHfztMegQJ0pJMLrnuTIyd0QTyWzVJRt6oq+HlZC4p5B6Hzya+Ya l8IlQBFUFch1JjgalBxWx0ryscZqYWegbqidQT/jJJrcCy75hTTW7uFKsWIP7gUNYU /r8nlwnn6xm1mRFCJhwPGcEPBXKv2q2TBQOiFkNteP2JUNW18JLHvEourW4QAFHr7K pbNrp83AhS4hQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Stephen Boyd Subject: [PATCH 18/69] Input: pmic8xxx-pwrkey - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:51 +0000 Message-Id: <20230102181842.718010-19-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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 --- drivers/input/misc/pmic8xxx-pwrkey.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/misc/pmic8xxx-pwrkey.c b/drivers/input/misc/pmic8xxx-pwrkey.c index 0e818a3d28c5..89fb137e3715 100644 --- a/drivers/input/misc/pmic8xxx-pwrkey.c +++ b/drivers/input/misc/pmic8xxx-pwrkey.c @@ -100,7 +100,7 @@ static irqreturn_t pwrkey_release_irq(int irq, void *_pwr) return IRQ_HANDLED; } -static int __maybe_unused pmic8xxx_pwrkey_suspend(struct device *dev) +static int pmic8xxx_pwrkey_suspend(struct device *dev) { struct pmic8xxx_pwrkey *pwrkey = dev_get_drvdata(dev); @@ -110,7 +110,7 @@ static int __maybe_unused pmic8xxx_pwrkey_suspend(struct device *dev) return 0; } -static int __maybe_unused pmic8xxx_pwrkey_resume(struct device *dev) +static int pmic8xxx_pwrkey_resume(struct device *dev) { struct pmic8xxx_pwrkey *pwrkey = dev_get_drvdata(dev); @@ -120,7 +120,7 @@ static int __maybe_unused pmic8xxx_pwrkey_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(pm8xxx_pwr_key_pm_ops, +static DEFINE_SIMPLE_DEV_PM_OPS(pm8xxx_pwr_key_pm_ops, pmic8xxx_pwrkey_suspend, pmic8xxx_pwrkey_resume); static void pmic8xxx_pwrkey_shutdown(struct platform_device *pdev) @@ -442,7 +442,7 @@ static struct platform_driver pmic8xxx_pwrkey_driver = { .shutdown = pmic8xxx_pwrkey_shutdown, .driver = { .name = "pm8xxx-pwrkey", - .pm = &pm8xxx_pwr_key_pm_ops, + .pm = pm_sleep_ptr(&pm8xxx_pwr_key_pm_ops), .of_match_table = pm8xxx_pwr_key_id_table, }, }; From patchwork Mon Jan 2 18:17:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638648 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 3D897C63707 for ; Mon, 2 Jan 2023 18:07:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236420AbjABSGu (ORCPT ); Mon, 2 Jan 2023 13:06:50 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236433AbjABSGW (ORCPT ); Mon, 2 Jan 2023 13:06:22 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8724C2F5 for ; Mon, 2 Jan 2023 10:06:21 -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 33F1AB80DE1 for ; Mon, 2 Jan 2023 18:06:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 08D1AC433D2; Mon, 2 Jan 2023 18:06:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682779; bh=A3VDr3P6iTDUlRzaCvvkA0+YjH0psQx1Ojm4OakkKgA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m3OTM4/X8GSvXOZwqecv6G589Nu63L2icqTFXfjxFsg/i2R5bSikQABNvSS/ql1Zt aP/72H85NJ83SjtwgrooDGoRdDBnLgXjolDWqO9WzVffWQ+DA58VfdjW874OnmndA4 I5h1gvA/gwdJ94RhadPWXgkTSsF+tKxkQXu4hmlfsvAc4P+b/TfPjvebIBtHOAVfBP Q1XBYneEZ1zF2JUD8QskK80yLVeLONDzWLmTPBtUX2AgJJgcLlUzdyb49xNJ73UqBS IQek/Mh9m0hhEwlmR1t/ADr5HDqmIUnzl2ylm95ru8jRMTWJcoYnEt4yB0m/qSnlU5 ynYb7sjKVnAtg== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Lars-Peter Clausen Subject: [PATCH 19/69] Input: pwm-beeper - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:52 +0000 Message-Id: <20230102181842.718010-20-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Lars-Peter Clausen --- drivers/input/misc/pwm-beeper.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/misc/pwm-beeper.c b/drivers/input/misc/pwm-beeper.c index d6b12477748a..3cf1812384e6 100644 --- a/drivers/input/misc/pwm-beeper.c +++ b/drivers/input/misc/pwm-beeper.c @@ -203,7 +203,7 @@ static int pwm_beeper_probe(struct platform_device *pdev) return 0; } -static int __maybe_unused pwm_beeper_suspend(struct device *dev) +static int pwm_beeper_suspend(struct device *dev) { struct pwm_beeper *beeper = dev_get_drvdata(dev); @@ -221,7 +221,7 @@ static int __maybe_unused pwm_beeper_suspend(struct device *dev) return 0; } -static int __maybe_unused pwm_beeper_resume(struct device *dev) +static int pwm_beeper_resume(struct device *dev) { struct pwm_beeper *beeper = dev_get_drvdata(dev); @@ -235,8 +235,8 @@ static int __maybe_unused pwm_beeper_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(pwm_beeper_pm_ops, - pwm_beeper_suspend, pwm_beeper_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(pwm_beeper_pm_ops, + pwm_beeper_suspend, pwm_beeper_resume); #ifdef CONFIG_OF static const struct of_device_id pwm_beeper_match[] = { @@ -250,7 +250,7 @@ static struct platform_driver pwm_beeper_driver = { .probe = pwm_beeper_probe, .driver = { .name = "pwm-beeper", - .pm = &pwm_beeper_pm_ops, + .pm = pm_sleep_ptr(&pwm_beeper_pm_ops), .of_match_table = of_match_ptr(pwm_beeper_match), }, }; From patchwork Mon Jan 2 18:17:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639141 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 6675FC63797 for ; Mon, 2 Jan 2023 18:07:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236499AbjABSGw (ORCPT ); Mon, 2 Jan 2023 13:06:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236435AbjABSGW (ORCPT ); Mon, 2 Jan 2023 13:06:22 -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 B3FC62E2 for ; Mon, 2 Jan 2023 10:06:21 -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 719B8B80D0D for ; Mon, 2 Jan 2023 18:06:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5E93FC433EF; Mon, 2 Jan 2023 18:06:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682780; bh=JXQWNe5ogfkH4k+8uuyvdtpGaRn0P1ym2tvP5GvgHlg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rr38E2PjHPrEwb68kyPJs7OCtrbzDqZXMfTPe3dPkBK9Zhp8yifjgvC64VgHyaed6 T9HoNa13CbSTVdW9RaURxA3PQFRNRpx5cDmyXa03expxRf6pV8aP97TYQOF+4r3YRb ll1PuyGlvOgu5Sw73a+vv738OFLAt/zC/NmPnakL0A82Fip9lO3LZ24YiY4IK9Ac6p k7P3kRaPm9P1WHREHw+CSx0TfIMF4YKLpLTY3Sr7MnPTRrRrJUnQ65iAf8M1HHHbLi xKqmz7y8hwlWXWsYgQfFDsBbe9aTGuC6lgMbH7O2V8T/nAdiRT3jVP0XBKGbsGUtKl I7qalREU29Elw== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 20/69] Input: pwm-vibra - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:53 +0000 Message-Id: <20230102181842.718010-21-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/misc/pwm-vibra.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/misc/pwm-vibra.c b/drivers/input/misc/pwm-vibra.c index 81e777a04b88..d0e58a7cdfa3 100644 --- a/drivers/input/misc/pwm-vibra.c +++ b/drivers/input/misc/pwm-vibra.c @@ -222,7 +222,7 @@ static int pwm_vibrator_probe(struct platform_device *pdev) return 0; } -static int __maybe_unused pwm_vibrator_suspend(struct device *dev) +static int pwm_vibrator_suspend(struct device *dev) { struct pwm_vibrator *vibrator = dev_get_drvdata(dev); @@ -233,7 +233,7 @@ static int __maybe_unused pwm_vibrator_suspend(struct device *dev) return 0; } -static int __maybe_unused pwm_vibrator_resume(struct device *dev) +static int pwm_vibrator_resume(struct device *dev) { struct pwm_vibrator *vibrator = dev_get_drvdata(dev); @@ -243,8 +243,8 @@ static int __maybe_unused pwm_vibrator_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(pwm_vibrator_pm_ops, - pwm_vibrator_suspend, pwm_vibrator_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(pwm_vibrator_pm_ops, + pwm_vibrator_suspend, pwm_vibrator_resume); #ifdef CONFIG_OF static const struct of_device_id pwm_vibra_dt_match_table[] = { @@ -258,7 +258,7 @@ static struct platform_driver pwm_vibrator_driver = { .probe = pwm_vibrator_probe, .driver = { .name = "pwm-vibrator", - .pm = &pwm_vibrator_pm_ops, + .pm = pm_sleep_ptr(&pwm_vibrator_pm_ops), .of_match_table = of_match_ptr(pwm_vibra_dt_match_table), }, }; From patchwork Mon Jan 2 18:17:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639142 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 28F8BC63709 for ; Mon, 2 Jan 2023 18:07:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236460AbjABSGv (ORCPT ); Mon, 2 Jan 2023 13:06:51 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49072 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236448AbjABSGX (ORCPT ); Mon, 2 Jan 2023 13:06:23 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DFC6960C5 for ; Mon, 2 Jan 2023 10:06: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 8362EB80DE1 for ; Mon, 2 Jan 2023 18:06:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 88127C433D2; Mon, 2 Jan 2023 18:06:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682781; bh=wjVMGv1EVkg0QfhlL7PNMIhfYWYJAg4kv+FqOq6PE1c=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qXCkiC09s1jtg159boAEm3roRKuTROnE26v1YVaZC3W+NzTWKEJm2I1xvK9w/02TQ r5zH63IN5awIaUH85Wvz9uXeY5TAdu+Bke1b2HV0EkZdsXgvskzKLAPNvH44JSTR2Y 3Pnw+pW+o0OmJorlOQ/7DUwspDA+29Yu2zkCZq0sv/XIRhQihc2whl7N3Y5Fnhb0fl IFCuGlKvpYl6fmtIP9Fxw5YGRivSBYzAlKnRqyysEa/b/aguffdkyVDUXbkoWZDGJ1 HtfcKlWr4u7d06pTSYTquq5/pQKKiZQ9xfa4WFO7yDFV1zrHCfcCQx4gFPuS/tl5l3 Y+HEh7dSfuIUg== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 21/69] Input: regulator-haptic - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:54 +0000 Message-Id: <20230102181842.718010-22-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/misc/regulator-haptic.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/misc/regulator-haptic.c b/drivers/input/misc/regulator-haptic.c index a661e77545c5..02f73b7c0462 100644 --- a/drivers/input/misc/regulator-haptic.c +++ b/drivers/input/misc/regulator-haptic.c @@ -201,7 +201,7 @@ static int regulator_haptic_probe(struct platform_device *pdev) return 0; } -static int __maybe_unused regulator_haptic_suspend(struct device *dev) +static int regulator_haptic_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct regulator_haptic *haptic = platform_get_drvdata(pdev); @@ -220,7 +220,7 @@ static int __maybe_unused regulator_haptic_suspend(struct device *dev) return 0; } -static int __maybe_unused regulator_haptic_resume(struct device *dev) +static int regulator_haptic_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct regulator_haptic *haptic = platform_get_drvdata(pdev); @@ -239,7 +239,7 @@ static int __maybe_unused regulator_haptic_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(regulator_haptic_pm_ops, +static DEFINE_SIMPLE_DEV_PM_OPS(regulator_haptic_pm_ops, regulator_haptic_suspend, regulator_haptic_resume); static const struct of_device_id regulator_haptic_dt_match[] = { @@ -253,7 +253,7 @@ static struct platform_driver regulator_haptic_driver = { .driver = { .name = "regulator-haptic", .of_match_table = regulator_haptic_dt_match, - .pm = ®ulator_haptic_pm_ops, + .pm = pm_sleep_ptr(®ulator_haptic_pm_ops), }, }; module_platform_driver(regulator_haptic_driver); From patchwork Mon Jan 2 18:17:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638652 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 54562C6379F for ; Mon, 2 Jan 2023 18:07:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236482AbjABSGw (ORCPT ); Mon, 2 Jan 2023 13:06:52 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49110 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236452AbjABSGY (ORCPT ); Mon, 2 Jan 2023 13:06:24 -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 6FDAADAD for ; Mon, 2 Jan 2023 10:06:23 -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 10B2361084 for ; Mon, 2 Jan 2023 18:06:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B2CD3C433F0; Mon, 2 Jan 2023 18:06:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682782; bh=+ch5UtL+cUuPYvpicRKC+EljnWwBiDjO5qkHl2IAZ9w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TcDxTHnD0wwhjkUo+Fp6nTLFSMjCXn4C/08DcgksOYi5puuCZZqnEMS5JQaTtElIz PfMzVIY1U7x5kdy8AUbuKUfWa2pyM6yMycjWKO8PS9+l1LSlC10JFwX09Ch9HWYA/0 N+pKXJ3SjnYVTo2HeqtFrd2HPPBgmCuhuPoJcjl/BneC12xA9j2irnfXQd3lDYpof+ XZzPp/ymEMbCK+b/sbS4rsSuiVbkDc/K93ODo3ClJlR4Qoy75Z959OsK3yr03plIDJ G/X+omuy1mhlnTObcqY0xenhXfosSonnd/f31my6cFOeSiT7sejdRSRpBUMM/UPQmD RQcuYvqxSQYAQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 22/69] Input: rotary-encoder - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:55 +0000 Message-Id: <20230102181842.718010-23-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/misc/rotary_encoder.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/misc/rotary_encoder.c b/drivers/input/misc/rotary_encoder.c index 6d613f2a017c..22ec62083065 100644 --- a/drivers/input/misc/rotary_encoder.c +++ b/drivers/input/misc/rotary_encoder.c @@ -317,7 +317,7 @@ static int rotary_encoder_probe(struct platform_device *pdev) return 0; } -static int __maybe_unused rotary_encoder_suspend(struct device *dev) +static int rotary_encoder_suspend(struct device *dev) { struct rotary_encoder *encoder = dev_get_drvdata(dev); unsigned int i; @@ -330,7 +330,7 @@ static int __maybe_unused rotary_encoder_suspend(struct device *dev) return 0; } -static int __maybe_unused rotary_encoder_resume(struct device *dev) +static int rotary_encoder_resume(struct device *dev) { struct rotary_encoder *encoder = dev_get_drvdata(dev); unsigned int i; @@ -343,8 +343,8 @@ static int __maybe_unused rotary_encoder_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(rotary_encoder_pm_ops, - rotary_encoder_suspend, rotary_encoder_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(rotary_encoder_pm_ops, + rotary_encoder_suspend, rotary_encoder_resume); #ifdef CONFIG_OF static const struct of_device_id rotary_encoder_of_match[] = { @@ -358,7 +358,7 @@ static struct platform_driver rotary_encoder_driver = { .probe = rotary_encoder_probe, .driver = { .name = DRV_NAME, - .pm = &rotary_encoder_pm_ops, + .pm = pm_sleep_ptr(&rotary_encoder_pm_ops), .of_match_table = of_match_ptr(rotary_encoder_of_match), } }; From patchwork Mon Jan 2 18:17:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639140 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 8C01CC64981 for ; Mon, 2 Jan 2023 18:07:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236505AbjABSGx (ORCPT ); Mon, 2 Jan 2023 13:06:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49126 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236440AbjABSGZ (ORCPT ); Mon, 2 Jan 2023 13:06:25 -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 D4ABE625E for ; Mon, 2 Jan 2023 10:06: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 dfw.source.kernel.org (Postfix) with ESMTPS id 7359B61057 for ; Mon, 2 Jan 2023 18:06:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E165BC433EF; Mon, 2 Jan 2023 18:06:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682783; bh=j0NIpOWit3G+Wo+4eOhQ1LFPtxE87nfPnMfqWmARnRc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HmhUu48iy4KtPBnj1L+7wltIrnpC8R0xyxZs8SnswJbT+nFIix7SUsBL1qbMsS2Sg NDguVUxDs3Cl22hVAUCTuRd7suDzd+kf0LG75dCAGwlo1V9whoLejr8r5hLvR+raKb S+NzGs20fgJOYvI9g5fA0mndNH409TPXyouq62Ssj5cPdn8bBI0fLm9wpPq5oewBjb sF+YrOpP1HEKDmAZ4T4M+3ackmEa3oHpRKFL3yYqRiAkf9NmMLn1n0qgvvOgpOy02z avqtaSo609+5/mzkuUUiXF7kgMKmPNVrA/OAB/uqqbwn/Aaxk1SsmxZVVPXJ3BF9Te Y5cG6nsYTudvg== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Pascal Paillet Subject: [PATCH 23/69] Input: stpmic1_onekey - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:56 +0000 Message-Id: <20230102181842.718010-24-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Pascal Paillet --- drivers/input/misc/stpmic1_onkey.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/input/misc/stpmic1_onkey.c b/drivers/input/misc/stpmic1_onkey.c index d8dc2f2f8000..d5ebca7b90a5 100644 --- a/drivers/input/misc/stpmic1_onkey.c +++ b/drivers/input/misc/stpmic1_onkey.c @@ -142,7 +142,7 @@ static int stpmic1_onkey_probe(struct platform_device *pdev) return 0; } -static int __maybe_unused stpmic1_onkey_suspend(struct device *dev) +static int stpmic1_onkey_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct stpmic1_onkey *onkey = platform_get_drvdata(pdev); @@ -154,7 +154,7 @@ static int __maybe_unused stpmic1_onkey_suspend(struct device *dev) return 0; } -static int __maybe_unused stpmic1_onkey_resume(struct device *dev) +static int stpmic1_onkey_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct stpmic1_onkey *onkey = platform_get_drvdata(pdev); @@ -166,9 +166,9 @@ static int __maybe_unused stpmic1_onkey_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(stpmic1_onkey_pm, - stpmic1_onkey_suspend, - stpmic1_onkey_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(stpmic1_onkey_pm, + stpmic1_onkey_suspend, + stpmic1_onkey_resume); static const struct of_device_id of_stpmic1_onkey_match[] = { { .compatible = "st,stpmic1-onkey" }, @@ -182,7 +182,7 @@ static struct platform_driver stpmic1_onkey_driver = { .driver = { .name = "stpmic1_onkey", .of_match_table = of_match_ptr(of_stpmic1_onkey_match), - .pm = &stpmic1_onkey_pm, + .pm = pm_sleep_ptr(&stpmic1_onkey_pm), }, }; module_platform_driver(stpmic1_onkey_driver); From patchwork Mon Jan 2 18:17:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639131 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 9AD3EC677F1 for ; Mon, 2 Jan 2023 18:07:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236433AbjABSGz (ORCPT ); Mon, 2 Jan 2023 13:06:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49138 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236457AbjABSG0 (ORCPT ); Mon, 2 Jan 2023 13:06:26 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 602C9C25 for ; Mon, 2 Jan 2023 10:06: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 dfw.source.kernel.org (Postfix) with ESMTPS id CAA6661084 for ; Mon, 2 Jan 2023 18:06:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4424FC433F1; Mon, 2 Jan 2023 18:06:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682785; bh=KJ/6Fiq+66gE9QBOZoiYId0WA81ucFP75UxDeS2Imk0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=e4yvhEs0xPTsnkD5HH60UsUBQP0Fd2zXRInJMyj/+aMx8MieFxqKp/RVuXJ7NYfuV z7gVpYD2XxSfBkT9ftrg7PLpkFA9yTbNyRY/SilpBkQxAEfa15jn5viQKOjBJ28KCF 9rs23lqUHX3o3SZvfI8HYdRlb1eiSF0VtvBaz0doJOxB/fLt1Xooh/OzFVl26uwGwr rRBBYUwo/OM+4A0/KnLW1cwNc1hUF5OFJl9pFzec7uReUyMk2wxQq7IOlky/wv36pS YFC0+NHg4BpmY7oKC4g+Q5Iok0/sv4Z0iuWpZRiWa1xx1JipYc3kGUM8wGpytzlrFC JRu1IhT81IUGg== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Tony Lindgren Subject: [PATCH 24/69] Input: twl4030-vibra - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:57 +0000 Message-Id: <20230102181842.718010-25-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Tony Lindgren --- drivers/input/misc/twl4030-vibra.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/misc/twl4030-vibra.c b/drivers/input/misc/twl4030-vibra.c index 5619996da86f..101548b35ee3 100644 --- a/drivers/input/misc/twl4030-vibra.c +++ b/drivers/input/misc/twl4030-vibra.c @@ -143,7 +143,7 @@ static void twl4030_vibra_close(struct input_dev *input) } /*** Module ***/ -static int __maybe_unused twl4030_vibra_suspend(struct device *dev) +static int twl4030_vibra_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct vibra_info *info = platform_get_drvdata(pdev); @@ -154,14 +154,14 @@ static int __maybe_unused twl4030_vibra_suspend(struct device *dev) return 0; } -static int __maybe_unused twl4030_vibra_resume(struct device *dev) +static int twl4030_vibra_resume(struct device *dev) { vibra_disable_leds(); return 0; } -static SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops, - twl4030_vibra_suspend, twl4030_vibra_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(twl4030_vibra_pm_ops, + twl4030_vibra_suspend, twl4030_vibra_resume); static bool twl4030_vibra_check_coexist(struct device_node *parent) { @@ -234,7 +234,7 @@ static struct platform_driver twl4030_vibra_driver = { .probe = twl4030_vibra_probe, .driver = { .name = "twl4030-vibra", - .pm = &twl4030_vibra_pm_ops, + .pm = pm_sleep_ptr(&twl4030_vibra_pm_ops), }, }; module_platform_driver(twl4030_vibra_driver); From patchwork Mon Jan 2 18:17:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638650 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 7C9B3C677F0 for ; Mon, 2 Jan 2023 18:07:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236508AbjABSGy (ORCPT ); Mon, 2 Jan 2023 13:06:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49176 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236475AbjABSG2 (ORCPT ); Mon, 2 Jan 2023 13:06:28 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90838116B for ; Mon, 2 Jan 2023 10:06:27 -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 2E2C561084 for ; Mon, 2 Jan 2023 18:06:27 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A1265C433EF; Mon, 2 Jan 2023 18:06:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682786; bh=kJHZb0C+/iFCJLe0VK0nSQP3gxiI/hMvlbaIkD1LlRA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=m550oxrW8uz81BVZhp43Q+SrcTp+I1b5QTzui7aN5N86wSCglfskTgQo+JQ9gTxXs zw3AMPpDWcrC6eE8rGN54m20iGFfvaJylitV8FS8c8yrxu8qupg9QQWczp/ipNgSwK vz/JLUOf0+Ejx1tnrZXqs0vUSCxrtl8YR5E2BOKJz9NH/qJbRTYU5ysD+qjTgnJkHU 2ezZ3CxhLmNQL84xLV/kLLd64RrbbRHvVh9tMvys6PFTOjS9n85n0K6yXhSeHQMu7d j6rAIED9usk66QIEPLULXZGZ5rP+KaHXVjEmWT8rl4qTMJ7tljYl1YJQUJunDo8KYg 7RILEjnrCaTSg== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Tony Lindgren Subject: [PATCH 25/69] Input: twl6030-vibra - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:58 +0000 Message-Id: <20230102181842.718010-26-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Tony Lindgren --- drivers/input/misc/twl6040-vibra.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/input/misc/twl6040-vibra.c b/drivers/input/misc/twl6040-vibra.c index bf6644927630..78f0b63e5c20 100644 --- a/drivers/input/misc/twl6040-vibra.c +++ b/drivers/input/misc/twl6040-vibra.c @@ -210,7 +210,7 @@ static void twl6040_vibra_close(struct input_dev *input) twl6040_vibra_disable(info); } -static int __maybe_unused twl6040_vibra_suspend(struct device *dev) +static int twl6040_vibra_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct vibra_info *info = platform_get_drvdata(pdev); @@ -223,7 +223,8 @@ static int __maybe_unused twl6040_vibra_suspend(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(twl6040_vibra_pm_ops, twl6040_vibra_suspend, NULL); +static DEFINE_SIMPLE_DEV_PM_OPS(twl6040_vibra_pm_ops, + twl6040_vibra_suspend, NULL); static int twl6040_vibra_probe(struct platform_device *pdev) { @@ -354,7 +355,7 @@ static struct platform_driver twl6040_vibra_driver = { .probe = twl6040_vibra_probe, .driver = { .name = "twl6040-vibra", - .pm = &twl6040_vibra_pm_ops, + .pm = pm_sleep_ptr(&twl6040_vibra_pm_ops), }, }; module_platform_driver(twl6040_vibra_driver); From patchwork Mon Jan 2 18:17:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639130 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 D5140C67871 for ; Mon, 2 Jan 2023 18:07:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236448AbjABSG4 (ORCPT ); Mon, 2 Jan 2023 13:06:56 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236480AbjABSGb (ORCPT ); Mon, 2 Jan 2023 13:06:31 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C68E255BB for ; Mon, 2 Jan 2023 10:06: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 ams.source.kernel.org (Postfix) with ESMTPS id 72169B80DE3 for ; Mon, 2 Jan 2023 18:06:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0436DC433D2; Mon, 2 Jan 2023 18:06:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682788; bh=g7UO7iKHYk0zDfciAqVRrsAYuaIPGXqDb8Nz8BCx4bs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CbVX+zF6IUFfHT/mIlBVehdut3KTB6g7wtmUapr+kcfEJGRXBo2+fBaoDS7iuYSeB bX6OIm770bDpR6YAwc+1AEAmMObO7EyB3ZyOF56P2ELjsdH21HmmSwY1baOicoukx8 FAODKAEeaVWNC4qxCVZ8Hk740TfV1g34pLF7uOjpn636Wn4aW9are61DI3au/QNFKq EaCj6UO8rttrWEnpEo3DNKxWdQ9HxAJo1QLBNC8mjpd1nMQ4dVieAzAvOHU5YivKJi Nk+iSRoK4ZamjFHYEFceroL2MVUEy5uRfwykkGHnmEiz/vSVaXGEmmjxNk485Xbu7/ GD0Wf1eLd7X+A== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Raul E Rangel , Hans de Goede Subject: [PATCH 26/69] Input: elan_i2c_core - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:17:59 +0000 Message-Id: <20230102181842.718010-27-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Raul E Rangel Cc: Hans de Goede Reviewed-by: Hans de Goede --- drivers/input/mouse/elan_i2c_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/mouse/elan_i2c_core.c b/drivers/input/mouse/elan_i2c_core.c index 76729ada1582..5f0d75a45c80 100644 --- a/drivers/input/mouse/elan_i2c_core.c +++ b/drivers/input/mouse/elan_i2c_core.c @@ -1328,7 +1328,7 @@ static int elan_probe(struct i2c_client *client) return 0; } -static int __maybe_unused elan_suspend(struct device *dev) +static int elan_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct elan_tp_data *data = i2c_get_clientdata(client); @@ -1365,7 +1365,7 @@ static int __maybe_unused elan_suspend(struct device *dev) return ret; } -static int __maybe_unused elan_resume(struct device *dev) +static int elan_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct elan_tp_data *data = i2c_get_clientdata(client); @@ -1394,7 +1394,7 @@ static int __maybe_unused elan_resume(struct device *dev) return error; } -static SIMPLE_DEV_PM_OPS(elan_pm_ops, elan_suspend, elan_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(elan_pm_ops, elan_suspend, elan_resume); static const struct i2c_device_id elan_id[] = { { DRIVER_NAME, 0 }, @@ -1418,7 +1418,7 @@ MODULE_DEVICE_TABLE(of, elan_of_match); static struct i2c_driver elan_driver = { .driver = { .name = DRIVER_NAME, - .pm = &elan_pm_ops, + .pm = pm_sleep_ptr(&elan_pm_ops), .acpi_match_table = ACPI_PTR(elan_acpi_id), .of_match_table = of_match_ptr(elan_of_match), .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Mon Jan 2 18:18:00 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639139 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 A9766C678D5 for ; Mon, 2 Jan 2023 18:07:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236435AbjABSGz (ORCPT ); Mon, 2 Jan 2023 13:06:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49198 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236479AbjABSGb (ORCPT ); Mon, 2 Jan 2023 13:06:31 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C15E116B for ; Mon, 2 Jan 2023 10:06: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 D4A4961090 for ; Mon, 2 Jan 2023 18:06:29 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7FE08C433EF; Mon, 2 Jan 2023 18:06:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682789; bh=PhkmDoI+0I6gM2p/4+vbRdX2WIzy2DkWL1S+oB0vbTA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kqWoHpMhAFLZm+6iSw3mx+j88uDEu7nNbZrqOxtHa5K6rkdxIBYcSRlWH1V1C4v45 gmUE8U1qaTLUyXcNjMeHrGirXaJVrq7vV/eERgOC9aTmD2Qn1PXZ1pTkJitf4v9lz2 f01hscYMPvnhXeemzhrOR9DO4AVGaUEx1vY6jOGHUZ1UTkHKCQdrqDpDqDElnzvwcU 5RN8U5AGo7+5OPGPN+zPaE3sgdD8dNAfdAJnlzIdMGy5pcaYGvFvAKi2jCOMrcf7BJ 7jwbQ1ViGJhhxQ96UNV1vaux0Tu1TQWuR36ZwE0Tn2WEt1Fv6O8EpMO9+CCuGWH81p qJpTBZ3IvMuzg== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 27/69] Input: navpoint - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:00 +0000 Message-Id: <20230102181842.718010-28-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/mouse/navpoint.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/input/mouse/navpoint.c b/drivers/input/mouse/navpoint.c index 4d67575bb276..2b7b86eef280 100644 --- a/drivers/input/mouse/navpoint.c +++ b/drivers/input/mouse/navpoint.c @@ -315,7 +315,7 @@ static int navpoint_remove(struct platform_device *pdev) return 0; } -static int __maybe_unused navpoint_suspend(struct device *dev) +static int navpoint_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct navpoint *navpoint = platform_get_drvdata(pdev); @@ -329,7 +329,7 @@ static int __maybe_unused navpoint_suspend(struct device *dev) return 0; } -static int __maybe_unused navpoint_resume(struct device *dev) +static int navpoint_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct navpoint *navpoint = platform_get_drvdata(pdev); @@ -343,14 +343,15 @@ static int __maybe_unused navpoint_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(navpoint_pm_ops, navpoint_suspend, navpoint_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(navpoint_pm_ops, + navpoint_suspend, navpoint_resume); static struct platform_driver navpoint_driver = { .probe = navpoint_probe, .remove = navpoint_remove, .driver = { .name = "navpoint", - .pm = &navpoint_pm_ops, + .pm = pm_sleep_ptr(&navpoint_pm_ops), }, }; From patchwork Mon Jan 2 18:18:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639138 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 E5FBCC678D6 for ; Mon, 2 Jan 2023 18:07:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236519AbjABSG7 (ORCPT ); Mon, 2 Jan 2023 13:06:59 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49224 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236488AbjABSGd (ORCPT ); Mon, 2 Jan 2023 13:06:33 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0464DDB1 for ; Mon, 2 Jan 2023 10:06:33 -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 B6D6FB80DDE for ; Mon, 2 Jan 2023 18:06:31 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B18B0C433F0; Mon, 2 Jan 2023 18:06:29 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682790; bh=JxgXGRC1AuHOUHx4JHC+Q1Fdj2PY8yXCBtkWTbn94Fs=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CkUnqwDW9iPjk/qBMsCSd/zpj6NxynoZYndEzQmWaBV+MbYmCluGqw3U5mDcKSLK2 dBPiBkbCq0bR580T/m7F21XSwOLAtW2TQo2QyaDM3ULVbORrH+6MVUq9NbK9MtQRu1 GCYCGNCY2ZV7npuE0Q16BuDIIrp5fGjvnEUY1Sd9LKikAsCS6ghH+Hu7fAzrDHt235 bR6K450/+nH7h4NYIO3oyOdJkWrKMPQ2ZbmlsvYX2DM8ZHhnrsBlKGY/zb3V+uQgaR PR3xBr+pXFYs4jqXQOCC390LP830Yz62Z4VYlZ/8lLrRZdjw9giWwIEkZFh29CpIzV 03l1aOc1FBC/g== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 28/69] Input: synaptics_i2c - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:01 +0000 Message-Id: <20230102181842.718010-29-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/mouse/synaptics_i2c.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/mouse/synaptics_i2c.c b/drivers/input/mouse/synaptics_i2c.c index 6487c8c60d5e..068692a8aba5 100644 --- a/drivers/input/mouse/synaptics_i2c.c +++ b/drivers/input/mouse/synaptics_i2c.c @@ -597,7 +597,7 @@ static void synaptics_i2c_remove(struct i2c_client *client) kfree(touch); } -static int __maybe_unused synaptics_i2c_suspend(struct device *dev) +static int synaptics_i2c_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct synaptics_i2c *touch = i2c_get_clientdata(client); @@ -610,7 +610,7 @@ static int __maybe_unused synaptics_i2c_suspend(struct device *dev) return 0; } -static int __maybe_unused synaptics_i2c_resume(struct device *dev) +static int synaptics_i2c_resume(struct device *dev) { int ret; struct i2c_client *client = to_i2c_client(dev); @@ -626,8 +626,8 @@ static int __maybe_unused synaptics_i2c_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(synaptics_i2c_pm, synaptics_i2c_suspend, - synaptics_i2c_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(synaptics_i2c_pm, synaptics_i2c_suspend, + synaptics_i2c_resume); static const struct i2c_device_id synaptics_i2c_id_table[] = { { "synaptics_i2c", 0 }, @@ -647,7 +647,7 @@ static struct i2c_driver synaptics_i2c_driver = { .driver = { .name = DRIVER_NAME, .of_match_table = of_match_ptr(synaptics_i2c_of_match), - .pm = &synaptics_i2c_pm, + .pm = pm_sleep_ptr(&synaptics_i2c_pm), }, .probe_new = synaptics_i2c_probe, From patchwork Mon Jan 2 18:18:02 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638647 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 09CCCC678D8 for ; Mon, 2 Jan 2023 18:07:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236488AbjABSHA (ORCPT ); Mon, 2 Jan 2023 13:07:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236486AbjABSGd (ORCPT ); Mon, 2 Jan 2023 13:06:33 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2184DAD for ; Mon, 2 Jan 2023 10:06: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 4F5AA61084 for ; Mon, 2 Jan 2023 18:06:32 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E9EE0C433D2; Mon, 2 Jan 2023 18:06:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682791; bh=t3XtVjo6jR8vWFZbI6nj9aLXlGbINHR9jQqeT3yIrcA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=r6/1KmJCvk9k08Cp2mQz83ioOHwZmNjnTnkShzuRpQFhhBErNH3UUwV07B2zcal6W rtOH2KOU0jDNA6U8norDSFfglakXZ5vz7lONRKK00SxXQ3PEz9Iarb0GpUH6yNvrbN U+MrjosmqWPr9EeU7mO9nszNCPKKoubVzzzUvfFdYL7HqdokCY5p2N1TZC3uVNNRoC Zda4SU48dotyWYQZg2wLaz6ITDLHrFIL2ahDpL0Yzp3Aw4HZ4MRrt65/u0jVbG4M+z Bva6QgSQr8l2f2I4NGERetevwurtcHF+Qcb5f6CkIpwJZhoWzpUN6pE7cYQR4Ar3Hf plzF1USbh1ywQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 29/69] Input: ambakmi - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:02 +0000 Message-Id: <20230102181842.718010-30-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/serio/ambakmi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/input/serio/ambakmi.c b/drivers/input/serio/ambakmi.c index c391700fc4ae..8fbfa448be4a 100644 --- a/drivers/input/serio/ambakmi.c +++ b/drivers/input/serio/ambakmi.c @@ -170,7 +170,7 @@ static void amba_kmi_remove(struct amba_device *dev) amba_release_regions(dev); } -static int __maybe_unused amba_kmi_resume(struct device *dev) +static int amba_kmi_resume(struct device *dev) { struct amba_kmi_port *kmi = dev_get_drvdata(dev); @@ -180,7 +180,7 @@ static int __maybe_unused amba_kmi_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(amba_kmi_dev_pm_ops, NULL, amba_kmi_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(amba_kmi_dev_pm_ops, NULL, amba_kmi_resume); static const struct amba_id amba_kmi_idtable[] = { { @@ -196,7 +196,7 @@ static struct amba_driver ambakmi_driver = { .drv = { .name = "kmi-pl050", .owner = THIS_MODULE, - .pm = &amba_kmi_dev_pm_ops, + .pm = pm_sleep_ptr(&amba_kmi_dev_pm_ops), }, .id_table = amba_kmi_idtable, .probe = amba_kmi_probe, From patchwork Mon Jan 2 18:18:03 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638649 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 BE106C3DA7A for ; Mon, 2 Jan 2023 18:07:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236513AbjABSG5 (ORCPT ); Mon, 2 Jan 2023 13:06:57 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236490AbjABSGe (ORCPT ); Mon, 2 Jan 2023 13:06:34 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 135F6DAD for ; Mon, 2 Jan 2023 10:06: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 A54D361038 for ; Mon, 2 Jan 2023 18:06:33 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2BB42C433EF; Mon, 2 Jan 2023 18:06:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682793; bh=A/p+bOHqSv9ECzGy2jdon9H3yyyOlExiHZ/PsPc3q6o=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=hLWW1KrkIWVrqmBl8dK2N+InEIT9rdFLcoaQELk0WyhSjfAM+hBokqJhj782ycyjc lkfSTjgVo39Y8xalbnVirVCfuxHnYOW52JjCUjw9kQiFoh3YEiLX4fZvVLo9kx5W5X ETMC6CH3Z9aM9BFJQmCmEwcrkInwbEsmSr8o7Ue+YwHU12cUByIJ36Ew5fa/XYrXKV MBpcqieoKJg5MUTIVh4+DqNPCngTTqitZZrKyNc/uMJTgSLR9oNDz5LqylmIY2IZn6 iF8wI62jPMbC1tNYufGt16TDmVrs129npuBo2xEeg0/2UrPyrJdh+ej/C9M/5vANjI qSlTiRAE82NEQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Michael Hennerich Subject: [PATCH 30/69] Input: ad7877 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:03 +0000 Message-Id: <20230102181842.718010-31-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/touchscreen/ad7877.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/ad7877.c b/drivers/input/touchscreen/ad7877.c index 08f5372f0bfd..edb36d663f22 100644 --- a/drivers/input/touchscreen/ad7877.c +++ b/drivers/input/touchscreen/ad7877.c @@ -788,7 +788,7 @@ static int ad7877_probe(struct spi_device *spi) return 0; } -static int __maybe_unused ad7877_suspend(struct device *dev) +static int ad7877_suspend(struct device *dev) { struct ad7877 *ts = dev_get_drvdata(dev); @@ -797,7 +797,7 @@ static int __maybe_unused ad7877_suspend(struct device *dev) return 0; } -static int __maybe_unused ad7877_resume(struct device *dev) +static int ad7877_resume(struct device *dev) { struct ad7877 *ts = dev_get_drvdata(dev); @@ -806,12 +806,12 @@ static int __maybe_unused ad7877_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(ad7877_pm, ad7877_suspend, ad7877_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(ad7877_pm, ad7877_suspend, ad7877_resume); static struct spi_driver ad7877_driver = { .driver = { .name = "ad7877", - .pm = &ad7877_pm, + .pm = pm_sleep_ptr(&ad7877_pm), }, .probe = ad7877_probe, }; From patchwork Mon Jan 2 18:18:04 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638646 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 1F45BC678D7 for ; Mon, 2 Jan 2023 18:07:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236491AbjABSHB (ORCPT ); Mon, 2 Jan 2023 13:07:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49282 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236493AbjABSGh (ORCPT ); Mon, 2 Jan 2023 13:06:37 -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 C6FDFB1CC for ; Mon, 2 Jan 2023 10:06: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 ams.source.kernel.org (Postfix) with ESMTPS id 81536B80DE3 for ; Mon, 2 Jan 2023 18:06:35 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7E870C433F0; Mon, 2 Jan 2023 18:06:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682794; bh=CCF9VP7+QSlMlgDTmWkVt9+SZ6veW1iH+HMzoVJj5fk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rDGQZaDyRFh7Hrk3eYqap9qikJZxq2YlpFBZKpLRabTUZftGAJPti1n+A+ghyOVrP TVzPDS9pA6M2gorONdpds0ybjimtaWAvEZz7EN1PnbIaQk8OfjKCH+5YoqCL07GicK UTc8jczSq3nAcHHo5MT9gQalILeW6GIMb4SuYZpDjArK+26TF0RRFuDM7eaKs7i+1B nMcMsNb+mj4QYTFlzzSJraIqVdLyoQwMYdKsRc2t88NoD2UrPlQ/TqqVtnf28mpGvO R6+ZuhHZeaNgFaGc47zre29K2yVA92xJmt4ET0FCnlss8F1MghJiHjc3W7pF2cczkr DxoFo8RtZg1dQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 31/69] Input: ads7846 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:04 +0000 Message-Id: <20230102181842.718010-32-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/touchscreen/ads7846.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/ads7846.c b/drivers/input/touchscreen/ads7846.c index bed68a68f330..4c3dd01902d0 100644 --- a/drivers/input/touchscreen/ads7846.c +++ b/drivers/input/touchscreen/ads7846.c @@ -944,7 +944,7 @@ static irqreturn_t ads7846_irq(int irq, void *handle) return IRQ_HANDLED; } -static int __maybe_unused ads7846_suspend(struct device *dev) +static int ads7846_suspend(struct device *dev) { struct ads7846 *ts = dev_get_drvdata(dev); @@ -966,7 +966,7 @@ static int __maybe_unused ads7846_suspend(struct device *dev) return 0; } -static int __maybe_unused ads7846_resume(struct device *dev) +static int ads7846_resume(struct device *dev) { struct ads7846 *ts = dev_get_drvdata(dev); @@ -988,7 +988,7 @@ static int __maybe_unused ads7846_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(ads7846_pm, ads7846_suspend, ads7846_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(ads7846_pm, ads7846_suspend, ads7846_resume); static int ads7846_setup_pendown(struct spi_device *spi, struct ads7846 *ts, @@ -1421,7 +1421,7 @@ static void ads7846_remove(struct spi_device *spi) static struct spi_driver ads7846_driver = { .driver = { .name = "ads7846", - .pm = &ads7846_pm, + .pm = pm_sleep_ptr(&ads7846_pm), .of_match_table = of_match_ptr(ads7846_dt_ids), }, .probe = ads7846_probe, From patchwork Mon Jan 2 18:18:05 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639134 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 2FF4DC678DA for ; Mon, 2 Jan 2023 18:07:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236486AbjABSHA (ORCPT ); Mon, 2 Jan 2023 13:07:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49280 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236491AbjABSGh (ORCPT ); Mon, 2 Jan 2023 13:06:37 -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 7228D5FF7 for ; Mon, 2 Jan 2023 10:06: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 0FDB061090 for ; Mon, 2 Jan 2023 18:06:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id AFA35C433EF; Mon, 2 Jan 2023 18:06:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682795; bh=ttZG/hThuLxfyJrixxjvdrjxHYGdj+JfoO65HELhxHE=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ksEzce4Ts55LR6b+Zmtqv5vjP5Jw0rhYW7DcWo/rRKhWOLuYcFZwt4BWNtivDl4vV 9yYYMgKL6TfAiA9skyO7X+PfGkF4H5VABIUtW6H8a0KBwDYbEfDA0J6TmjEl8B6Wtf hVSdtnRYXrUQ4mpUwGHNXEHCc/fJ7ANkIDYOf6TxHQF6oaibOdJySF99O/Ec999w7j 6v6f2J/I62QIEB6VyE4C12tc7IM+Fnqw1m6dJ4YABdBN5OcaFMZJLcJGzx9+0h4Jho vw6s+h55ta6/Q7PdKdakyGLi0IGN7StyGatpfTgzVXTwrZKfnh63LwNuKBFEe/tO/V wKMff1Ifptw8w== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 32/69] Input: ar1021 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:05 +0000 Message-Id: <20230102181842.718010-33-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/touchscreen/ar1021_i2c.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/ar1021_i2c.c b/drivers/input/touchscreen/ar1021_i2c.c index 25bcc677e98b..3a5b65cae360 100644 --- a/drivers/input/touchscreen/ar1021_i2c.c +++ b/drivers/input/touchscreen/ar1021_i2c.c @@ -142,7 +142,7 @@ static int ar1021_i2c_probe(struct i2c_client *client) return 0; } -static int __maybe_unused ar1021_i2c_suspend(struct device *dev) +static int ar1021_i2c_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); @@ -151,7 +151,7 @@ static int __maybe_unused ar1021_i2c_suspend(struct device *dev) return 0; } -static int __maybe_unused ar1021_i2c_resume(struct device *dev) +static int ar1021_i2c_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); @@ -160,7 +160,8 @@ static int __maybe_unused ar1021_i2c_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(ar1021_i2c_pm, ar1021_i2c_suspend, ar1021_i2c_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(ar1021_i2c_pm, + ar1021_i2c_suspend, ar1021_i2c_resume); static const struct i2c_device_id ar1021_i2c_id[] = { { "ar1021", 0 }, @@ -177,7 +178,7 @@ MODULE_DEVICE_TABLE(of, ar1021_i2c_of_match); static struct i2c_driver ar1021_i2c_driver = { .driver = { .name = "ar1021_i2c", - .pm = &ar1021_i2c_pm, + .pm = pm_sleep_ptr(&ar1021_i2c_pm), .of_match_table = ar1021_i2c_of_match, }, From patchwork Mon Jan 2 18:18:06 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639135 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 431AFC678D9 for ; Mon, 2 Jan 2023 18:07:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236493AbjABSHC (ORCPT ); Mon, 2 Jan 2023 13:07:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49296 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236495AbjABSGj (ORCPT ); Mon, 2 Jan 2023 13:06:39 -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 1F5BB38BD for ; Mon, 2 Jan 2023 10:06:38 -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 B05CE61038 for ; Mon, 2 Jan 2023 18:06:37 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DA17BC433D2; Mon, 2 Jan 2023 18:06:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682797; bh=Un5nYpevtqceByjkTlY/X84bVFVGTSzGQTioYBHsDFc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=M+xyZI9FYQYcB5IbBbvV1ZpVGO0ubS3rLgpISAan2k8C1cxRnNgUdt+xKjBB2ooGD Pmqs0rPpv6IhbqM3QJnrEKxNsE0181Yt7RT9PavJFLGCZw18hZ8BmSTvGkeC83eH5o BkCJT2+bCudQs9ImDTuU1PVZs+PjigJqHf7CR+/hGj7jT9MtsXirEQqCOFC51m+Yw2 vsPm/A7CdZLCEul8CzUy8p9VCYEk0s+pMJntWvd0rMfjtdv9dyXlRHlBruAPsCCoeJ z6IVHXpvTlkK791AdWdZrvkZth+hhPbzxTzal8wUpQ+8fMfzTa4hE182ICsC1N7a48 mqOAOXxvRTajQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Nicolas Ferre , Alexandre Belloni , Claudiu Beznea Subject: [PATCH 33/69] Input: atmel_mxt_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:06 +0000 Message-Id: <20230102181842.718010-34-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Nicolas Ferre Cc: Alexandre Belloni Cc: Claudiu Beznea --- drivers/input/touchscreen/atmel_mxt_ts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c index 39ef2664b852..996bf434e1cb 100644 --- a/drivers/input/touchscreen/atmel_mxt_ts.c +++ b/drivers/input/touchscreen/atmel_mxt_ts.c @@ -3296,7 +3296,7 @@ static void mxt_remove(struct i2c_client *client) data->regulators); } -static int __maybe_unused mxt_suspend(struct device *dev) +static int mxt_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct mxt_data *data = i2c_get_clientdata(client); @@ -3317,7 +3317,7 @@ static int __maybe_unused mxt_suspend(struct device *dev) return 0; } -static int __maybe_unused mxt_resume(struct device *dev) +static int mxt_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct mxt_data *data = i2c_get_clientdata(client); @@ -3338,7 +3338,7 @@ static int __maybe_unused mxt_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(mxt_pm_ops, mxt_suspend, mxt_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(mxt_pm_ops, mxt_suspend, mxt_resume); static const struct of_device_id mxt_of_match[] = { { .compatible = "atmel,maxtouch", }, @@ -3375,7 +3375,7 @@ static struct i2c_driver mxt_driver = { .name = "atmel_mxt_ts", .of_match_table = mxt_of_match, .acpi_match_table = ACPI_PTR(mxt_acpi_id), - .pm = &mxt_pm_ops, + .pm = pm_sleep_ptr(&mxt_pm_ops), }, .probe_new = mxt_probe, .remove = mxt_remove, From patchwork Mon Jan 2 18:18:07 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639136 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 6A2DAC678DD for ; Mon, 2 Jan 2023 18:07:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236562AbjABSHO (ORCPT ); Mon, 2 Jan 2023 13:07:14 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49320 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234664AbjABSGl (ORCPT ); Mon, 2 Jan 2023 13:06:41 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09ED4DB1 for ; Mon, 2 Jan 2023 10:06: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 B1633B80DDE for ; Mon, 2 Jan 2023 18:06:39 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 85D7CC433EF; Mon, 2 Jan 2023 18:06:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682798; bh=8ZdOGz/bDhGDj4PVUr5gjyywEohp0wPXoxVGIOiIUMo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WeDkJ6uQvyMx/vdqtEWvf7N00zNr2xJsNkVcFecS99yl15UKbZH+xNUdbCxyyb8l0 cgVQ9qxO7qC8capr3NUmHqBEpDKbo8/naq/xlajoefeKZUj5OuOttoXfJBjwpKE6AA it4GYFYe+U9/OSiPNfGaapW1DgynGOpYoNE5wG50QL1PzNh/B86L0F7xhndhGDWWVZ PqSznY/6bRFkTjpo96CwKAHE2LvNQcDPc+V67ojZjDe5K44Wk/1/ImapT7x6pjQG89 2w6wwKzbzok6mEZON7krFPmZh17rbAxLgkeHpgu++D8baGX/tjM/dWoiFPr/4AiRHK eIeywfpZffWmg== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Heiko Stuebner Subject: [PATCH 34/69] Input: auo-pixcir-ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:07 +0000 Message-Id: <20230102181842.718010-35-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Heiko Stuebner --- drivers/input/touchscreen/auo-pixcir-ts.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/auo-pixcir-ts.c b/drivers/input/touchscreen/auo-pixcir-ts.c index a4a1d58aeeac..5359efc80b2b 100644 --- a/drivers/input/touchscreen/auo-pixcir-ts.c +++ b/drivers/input/touchscreen/auo-pixcir-ts.c @@ -410,7 +410,7 @@ static void auo_pixcir_input_close(struct input_dev *dev) auo_pixcir_stop(ts); } -static int __maybe_unused auo_pixcir_suspend(struct device *dev) +static int auo_pixcir_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct auo_pixcir_ts *ts = i2c_get_clientdata(client); @@ -442,7 +442,7 @@ static int __maybe_unused auo_pixcir_suspend(struct device *dev) return ret; } -static int __maybe_unused auo_pixcir_resume(struct device *dev) +static int auo_pixcir_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct auo_pixcir_ts *ts = i2c_get_clientdata(client); @@ -472,8 +472,8 @@ static int __maybe_unused auo_pixcir_resume(struct device *dev) return ret; } -static SIMPLE_DEV_PM_OPS(auo_pixcir_pm_ops, - auo_pixcir_suspend, auo_pixcir_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(auo_pixcir_pm_ops, + auo_pixcir_suspend, auo_pixcir_resume); static void auo_pixcir_reset(void *data) { @@ -633,7 +633,7 @@ MODULE_DEVICE_TABLE(of, auo_pixcir_ts_dt_idtable); static struct i2c_driver auo_pixcir_driver = { .driver = { .name = "auo_pixcir_ts", - .pm = &auo_pixcir_pm_ops, + .pm = pm_sleep_ptr(&auo_pixcir_pm_ops), .of_match_table = of_match_ptr(auo_pixcir_ts_dt_idtable), }, .probe_new = auo_pixcir_probe, From patchwork Mon Jan 2 18:18:08 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638640 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 2BAB2C4708E for ; Mon, 2 Jan 2023 18:07:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234664AbjABSHQ (ORCPT ); Mon, 2 Jan 2023 13:07:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236329AbjABSGo (ORCPT ); Mon, 2 Jan 2023 13:06:44 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 735B460C5 for ; Mon, 2 Jan 2023 10:06: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 2CB72B80DE8 for ; Mon, 2 Jan 2023 18:06:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id D7E04C433D2; Mon, 2 Jan 2023 18:06:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682799; bh=6sMKeo3C8fj8EQqv6VxbCdOrcGolTm+q78xJDXML3Zo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=sH0o4v/Uj0ja3NqCyrGOYBaVXuWHOg37WpURjZvaAQJsB3Ukz2FlQZL66YLcQ3LU4 P5npwcrKfb5jncWgW3eg9MEXJqABa6R5Dh44if/ELwgiJc6UD7t0MYNdNS58MVok9t tkJna8YRLp54Bc8oHqeT0x51hiPbkmt0z1rOHY3jDTIEqBMjUXYQi4VUKKXRVkyfd+ xInH0weeMo6AC1P5ZQxta2n4ZW5OYE2F+GSCZFDQdHu9X1TUv4eAQbakEtHewD0fbn IdExqRO2eNZk4jVpImme0dDKR+ymIpykWk+pfV5QHKt7CiwtbR4KpznUIi167a5eYy XVnNT+wTqlaoQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Linus Walleij Subject: [PATCH 35/69] Input: bu21013_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:08 +0000 Message-Id: <20230102181842.718010-36-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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 --- drivers/input/touchscreen/bu21013_ts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/bu21013_ts.c b/drivers/input/touchscreen/bu21013_ts.c index 5a4dbd39a372..c994ab6f4e58 100644 --- a/drivers/input/touchscreen/bu21013_ts.c +++ b/drivers/input/touchscreen/bu21013_ts.c @@ -560,7 +560,7 @@ static void bu21013_remove(struct i2c_client *client) /* The resources will be freed by devm */ } -static int __maybe_unused bu21013_suspend(struct device *dev) +static int bu21013_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct bu21013_ts *ts = i2c_get_clientdata(client); @@ -575,7 +575,7 @@ static int __maybe_unused bu21013_suspend(struct device *dev) return 0; } -static int __maybe_unused bu21013_resume(struct device *dev) +static int bu21013_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct bu21013_ts *ts = i2c_get_clientdata(client); @@ -604,7 +604,7 @@ static int __maybe_unused bu21013_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(bu21013_dev_pm_ops, bu21013_suspend, bu21013_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(bu21013_dev_pm_ops, bu21013_suspend, bu21013_resume); static const struct i2c_device_id bu21013_id[] = { { DRIVER_TP, 0 }, @@ -615,7 +615,7 @@ MODULE_DEVICE_TABLE(i2c, bu21013_id); static struct i2c_driver bu21013_driver = { .driver = { .name = DRIVER_TP, - .pm = &bu21013_dev_pm_ops, + .pm = pm_sleep_ptr(&bu21013_dev_pm_ops), }, .probe_new = bu21013_probe, .remove = bu21013_remove, From patchwork Mon Jan 2 18:18:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639137 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 55B13C678DC for ; Mon, 2 Jan 2023 18:07:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232708AbjABSHP (ORCPT ); Mon, 2 Jan 2023 13:07:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49338 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236182AbjABSGm (ORCPT ); Mon, 2 Jan 2023 13:06:42 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 45B2B5F96 for ; Mon, 2 Jan 2023 10:06: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 D5A9D61084 for ; Mon, 2 Jan 2023 18:06:41 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3609AC433F0; Mon, 2 Jan 2023 18:06:40 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682801; bh=Hm+NMfy8u4Ey3XwANoh8EzMdtU1FKdyDxaIe/img+7Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Qlc3ZPIwuehOhcOT0Wdgsfc5uX2E1ZlxDUiWDE4fF1ui8sn1JUWIjSe09lWeOq9gX rDz/wc3wxJih/dBvj97W4z+HiCxhE+Asn7eSoRSMdIyTxCiao/6ZHbeIQ2KTjPqL6L t+94w0/Mp+6theDOz8pjkpa8fH1nvFEpJFUf5mNwQOWGdG71074PKqcWx32ejM4r3a zY3le2rX+E+VDPQbRGT86V5akxoqmj69q/mE68ZsE9ZHUe2ZBbzATmC6kCL83toINT F+MghwZ05ZWs31SR/fgO2lb8ZI/Y6WDvgV65r2fL6UW1Q5PfJ/N0vOOyLT7FPgFR8C gelaE8oytW6UQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Zhu Yi , Mark Jonas Subject: [PATCH 36/69] Input: bu21029 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:09 +0000 Message-Id: <20230102181842.718010-37-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Zhu Yi Cc: Mark Jonas --- drivers/input/touchscreen/bu21029_ts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/bu21029_ts.c b/drivers/input/touchscreen/bu21029_ts.c index 215f4dc5105d..8f1442894ff9 100644 --- a/drivers/input/touchscreen/bu21029_ts.c +++ b/drivers/input/touchscreen/bu21029_ts.c @@ -422,7 +422,7 @@ static int bu21029_probe(struct i2c_client *client) return 0; } -static int __maybe_unused bu21029_suspend(struct device *dev) +static int bu21029_suspend(struct device *dev) { struct i2c_client *i2c = to_i2c_client(dev); struct bu21029_ts_data *bu21029 = i2c_get_clientdata(i2c); @@ -437,7 +437,7 @@ static int __maybe_unused bu21029_suspend(struct device *dev) return 0; } -static int __maybe_unused bu21029_resume(struct device *dev) +static int bu21029_resume(struct device *dev) { struct i2c_client *i2c = to_i2c_client(dev); struct bu21029_ts_data *bu21029 = i2c_get_clientdata(i2c); @@ -451,7 +451,7 @@ static int __maybe_unused bu21029_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(bu21029_pm_ops, bu21029_suspend, bu21029_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(bu21029_pm_ops, bu21029_suspend, bu21029_resume); static const struct i2c_device_id bu21029_ids[] = { { DRIVER_NAME, 0 }, @@ -471,7 +471,7 @@ static struct i2c_driver bu21029_driver = { .driver = { .name = DRIVER_NAME, .of_match_table = of_match_ptr(bu21029_of_ids), - .pm = &bu21029_pm_ops, + .pm = pm_sleep_ptr(&bu21029_pm_ops), }, .id_table = bu21029_ids, .probe_new = bu21029_probe, From patchwork Mon Jan 2 18:18:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638645 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 79409C678DE for ; Mon, 2 Jan 2023 18:07:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232873AbjABSHP (ORCPT ); Mon, 2 Jan 2023 13:07:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49366 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236341AbjABSGo (ORCPT ); Mon, 2 Jan 2023 13:06:44 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9C7BD2E2 for ; Mon, 2 Jan 2023 10:06:43 -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 39D4B61084 for ; Mon, 2 Jan 2023 18:06:43 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B11E6C433D2; Mon, 2 Jan 2023 18:06:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682802; bh=zAeCllVa4MlsazseY7jZE/SQhpAgSJ7SLe3rljqgoyI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OSRRDhOO6l+SDkW/KxtiyPjniWJxdehJAjWfUHjxnf/ARgXSgCzTGZFQDBAx8M1Qf 1+ff1l/8lf32TMTlPF3gDipX1yfa+wMZuQplFQAm4sQ9M/7Sodk0S4SPpPtUSmm1Ac STiZWOkqYGcQdTtr/2snoI45mYsJWsBdO4zWH4R+IS07rulpXv3dyNtYa7qxtw2pKQ 4XFeFH2SRddXMpBSOer1GczKbjdWUQ5tqBgf38lOCgp4c+rzNi1VLAC0VoRTzV/Fau QrQWpwUQGETIDFqraBBBv1ml61FITtUDWElng6xLfBtc2087O1n1deuuWa9F3HQjb0 KcHQh4v3PN66g== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Hans de Goede Subject: [PATCH 37/69] Input: chipone_in8318 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:10 +0000 Message-Id: <20230102181842.718010-38-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Hans de Goede --- drivers/input/touchscreen/chipone_icn8318.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/chipone_icn8318.c b/drivers/input/touchscreen/chipone_icn8318.c index f6769e4bd4f2..32b714a6ed2d 100644 --- a/drivers/input/touchscreen/chipone_icn8318.c +++ b/drivers/input/touchscreen/chipone_icn8318.c @@ -148,7 +148,6 @@ static void icn8318_stop(struct input_dev *dev) gpiod_set_value_cansleep(data->wake_gpio, 0); } -#ifdef CONFIG_PM_SLEEP static int icn8318_suspend(struct device *dev) { struct icn8318_data *data = i2c_get_clientdata(to_i2c_client(dev)); @@ -172,9 +171,8 @@ static int icn8318_resume(struct device *dev) return 0; } -#endif -static SIMPLE_DEV_PM_OPS(icn8318_pm_ops, icn8318_suspend, icn8318_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(icn8318_pm_ops, icn8318_suspend, icn8318_resume); static int icn8318_probe(struct i2c_client *client) { @@ -263,7 +261,7 @@ MODULE_DEVICE_TABLE(i2c, icn8318_i2c_id); static struct i2c_driver icn8318_driver = { .driver = { .name = "chipone_icn8318", - .pm = &icn8318_pm_ops, + .pm = pm_sleep_ptr(&icn8318_pm_ops), .of_match_table = icn8318_of_match, }, .probe_new = icn8318_probe, From patchwork Mon Jan 2 18:18:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639133 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 7D240C53210 for ; Mon, 2 Jan 2023 18:07:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231908AbjABSHR (ORCPT ); Mon, 2 Jan 2023 13:07:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49394 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236347AbjABSGq (ORCPT ); Mon, 2 Jan 2023 13:06:46 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EAF98DAD for ; Mon, 2 Jan 2023 10:06:44 -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 8790061057 for ; Mon, 2 Jan 2023 18:06:44 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0FF53C433EF; Mon, 2 Jan 2023 18:06:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682804; bh=i+FyiKYmLe1L+sLbYHa7msOReo53wYA1a5SokQf2hQk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lVXHcPBXEBrlH/YeNhU7APtSZw8Rvvmyn85lgl3m0B8xZIWg6GbHBpH+q8BBYdOxl tP3nuDh74WyeswyZC+CCqYlbfWxNSN1rhf4FaIujiMg0yaaCwFuDp3i7SA3r2QPWUU EWVCI774pTB3bPZCweqCQtykAYjXwqZZarQzn8viRrurXUvtG9tnQ5hIom9+t2GSv+ 3AiHoQdBBXKRPozvVfKLXTwa9fdXZtJr2M6z7LBW6JkFOZf5PVSJPuPrre4Nsc6Rqq uA4C5Wl9tn3W/7i/x1jgNb1koZDZ3M9lQQqiu6EhxryPT0VrWp6sMoMprOQh1Ztzn1 reqMXwE+3lNdQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Hans de Goede Subject: [PATCH 38/69] Input: chipone_icn8505 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:11 +0000 Message-Id: <20230102181842.718010-39-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Hans de Goede Reviewed-by: Hans de Goede --- drivers/input/touchscreen/chipone_icn8505.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/chipone_icn8505.c b/drivers/input/touchscreen/chipone_icn8505.c index c421f4be2700..246bee0bee53 100644 --- a/drivers/input/touchscreen/chipone_icn8505.c +++ b/drivers/input/touchscreen/chipone_icn8505.c @@ -460,7 +460,7 @@ static int icn8505_probe(struct i2c_client *client) return 0; } -static int __maybe_unused icn8505_suspend(struct device *dev) +static int icn8505_suspend(struct device *dev) { struct icn8505_data *icn8505 = i2c_get_clientdata(to_i2c_client(dev)); @@ -471,7 +471,7 @@ static int __maybe_unused icn8505_suspend(struct device *dev) return 0; } -static int __maybe_unused icn8505_resume(struct device *dev) +static int icn8505_resume(struct device *dev) { struct icn8505_data *icn8505 = i2c_get_clientdata(to_i2c_client(dev)); int error; @@ -484,7 +484,7 @@ static int __maybe_unused icn8505_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(icn8505_pm_ops, icn8505_suspend, icn8505_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(icn8505_pm_ops, icn8505_suspend, icn8505_resume); static const struct acpi_device_id icn8505_acpi_match[] = { { "CHPN0001" }, @@ -495,7 +495,7 @@ MODULE_DEVICE_TABLE(acpi, icn8505_acpi_match); static struct i2c_driver icn8505_driver = { .driver = { .name = "chipone_icn8505", - .pm = &icn8505_pm_ops, + .pm = pm_sleep_ptr(&icn8505_pm_ops), .acpi_match_table = icn8505_acpi_match, }, .probe_new = icn8505_probe, From patchwork Mon Jan 2 18:18:12 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639129 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 B83F1C678DB for ; Mon, 2 Jan 2023 18:07:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236182AbjABSHQ (ORCPT ); Mon, 2 Jan 2023 13:07:16 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49404 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236361AbjABSGq (ORCPT ); Mon, 2 Jan 2023 13:06:46 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 529DB38BD for ; Mon, 2 Jan 2023 10:06: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 dfw.source.kernel.org (Postfix) with ESMTPS id DA38C61038 for ; Mon, 2 Jan 2023 18:06:45 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 62309C433F0; Mon, 2 Jan 2023 18:06:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682805; bh=P52FlEoCRfPh6+uYTUIosrqGHhs0uvLmWr7ieXaP2pU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=MW5o7lbLLzncWae+N9RQ0A08mYZuMwUlc008XgCwfRu5HKBCuhjGjOuqTjD8D8ap/ 3vLPBLELVar1GXlf2BfaDaa3stWFkMLyvarnKV1j1jarJqC8aM6JoH2VVfmjvNtjoC rzvVUOPpo96cs/g8lRzeByvT2DyeIzDdXSQc/2A5Yp2Vl1T/gDYkozJZG8jhTVmJho 9tckmVkmj3rX3D/FliIWNGUBRaXvpo3yL7914yIMgFMhj0k9UUqwiEww2B96E+WxDR reM3BvhHAlg095ERCaIHzINKmFJVGqEP6zvZNzYxLlGUAWU8YUH95w+xlxnWzyEm1c dlUJO7J0tg6eg== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Linus Walleij Subject: [PATCH 39/69] Input: cy8ctma140 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:12 +0000 Message-Id: <20230102181842.718010-40-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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 --- drivers/input/touchscreen/cy8ctma140.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/cy8ctma140.c b/drivers/input/touchscreen/cy8ctma140.c index 3a91d948b7f6..cd86477d971a 100644 --- a/drivers/input/touchscreen/cy8ctma140.c +++ b/drivers/input/touchscreen/cy8ctma140.c @@ -296,7 +296,7 @@ static int cy8ctma140_probe(struct i2c_client *client) return 0; } -static int __maybe_unused cy8ctma140_suspend(struct device *dev) +static int cy8ctma140_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct cy8ctma140 *ts = i2c_get_clientdata(client); @@ -307,7 +307,7 @@ static int __maybe_unused cy8ctma140_suspend(struct device *dev) return 0; } -static int __maybe_unused cy8ctma140_resume(struct device *dev) +static int cy8ctma140_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct cy8ctma140 *ts = i2c_get_clientdata(client); @@ -322,7 +322,8 @@ static int __maybe_unused cy8ctma140_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(cy8ctma140_pm, cy8ctma140_suspend, cy8ctma140_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(cy8ctma140_pm, + cy8ctma140_suspend, cy8ctma140_resume); static const struct i2c_device_id cy8ctma140_idtable[] = { { CY8CTMA140_NAME, 0 }, @@ -339,7 +340,7 @@ MODULE_DEVICE_TABLE(of, cy8ctma140_of_match); static struct i2c_driver cy8ctma140_driver = { .driver = { .name = CY8CTMA140_NAME, - .pm = &cy8ctma140_pm, + .pm = pm_sleep_ptr(&cy8ctma140_pm), .of_match_table = cy8ctma140_of_match, }, .id_table = cy8ctma140_idtable, From patchwork Mon Jan 2 18:18:13 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638643 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 82573C54EBC for ; Mon, 2 Jan 2023 18:07:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236346AbjABSHS (ORCPT ); Mon, 2 Jan 2023 13:07:18 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49422 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236439AbjABSGu (ORCPT ); Mon, 2 Jan 2023 13:06:50 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C3A02F5 for ; Mon, 2 Jan 2023 10:06:49 -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 EBB11B80DE9 for ; Mon, 2 Jan 2023 18:06:47 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B4750C433D2; Mon, 2 Jan 2023 18:06:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682806; bh=9nAWkRRQRs1+5gNeftMIhlHfgQ85pgTDAkPVOD9oe5g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EoUMLAIKkIIu+YT6Y3Dgt4clngVZr7A7isvhIKy0M1MUGriPbhFSdj8zPsHq5eLNx 0qVlE1ZZC96qYzpW+3fvCJ8S7gpnJw4/xLzqc6YzFVpdr8UQE5DGa2guW++JUoXX0V Qvn2ZYfQCyM08T7cqSxyRiRmL8XCBJXXnBm6Zp5FmI9Vk18XCRtSo51834Tqi0LDGn fpCcS0dW/SURAJ40W9+HHozpXL1Fxa6VhsNziLsCn/V/Yi/WvtglxrN54bar5VXvOx iayvl8IcKhOjAN7Y7vyDI/7Ig/fE0sWi3fRbff0fx5fGfiTNajBPj1wrnJ2jVO9P7e nrIPzSIRA+tew== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Linus Walleij Subject: [PATCH 40/69] Input: cy8ctmg110_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:13 +0000 Message-Id: <20230102181842.718010-41-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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 --- drivers/input/touchscreen/cy8ctmg110_ts.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/cy8ctmg110_ts.c b/drivers/input/touchscreen/cy8ctmg110_ts.c index 7c2b7309dbaf..dcf50fbf6dc7 100644 --- a/drivers/input/touchscreen/cy8ctmg110_ts.c +++ b/drivers/input/touchscreen/cy8ctmg110_ts.c @@ -237,7 +237,7 @@ static int cy8ctmg110_probe(struct i2c_client *client) return 0; } -static int __maybe_unused cy8ctmg110_suspend(struct device *dev) +static int cy8ctmg110_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct cy8ctmg110 *ts = i2c_get_clientdata(client); @@ -250,7 +250,7 @@ static int __maybe_unused cy8ctmg110_suspend(struct device *dev) return 0; } -static int __maybe_unused cy8ctmg110_resume(struct device *dev) +static int cy8ctmg110_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct cy8ctmg110 *ts = i2c_get_clientdata(client); @@ -263,7 +263,8 @@ static int __maybe_unused cy8ctmg110_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(cy8ctmg110_pm, cy8ctmg110_suspend, cy8ctmg110_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(cy8ctmg110_pm, + cy8ctmg110_suspend, cy8ctmg110_resume); static const struct i2c_device_id cy8ctmg110_idtable[] = { { CY8CTMG110_DRIVER_NAME, 1 }, @@ -275,7 +276,7 @@ MODULE_DEVICE_TABLE(i2c, cy8ctmg110_idtable); static struct i2c_driver cy8ctmg110_driver = { .driver = { .name = CY8CTMG110_DRIVER_NAME, - .pm = &cy8ctmg110_pm, + .pm = pm_sleep_ptr(&cy8ctmg110_pm), }, .id_table = cy8ctmg110_idtable, .probe_new = cy8ctmg110_probe, From patchwork Mon Jan 2 18:18:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639132 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 1F7AAC4708D for ; Mon, 2 Jan 2023 18:07:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236341AbjABSHR (ORCPT ); Mon, 2 Jan 2023 13:07:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49420 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236451AbjABSGu (ORCPT ); Mon, 2 Jan 2023 13:06:50 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 249B92E2 for ; Mon, 2 Jan 2023 10:06:49 -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 B59F561090 for ; Mon, 2 Jan 2023 18:06:48 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12E77C433F0; Mon, 2 Jan 2023 18:06:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682808; bh=d0bE5TyAe4V50qpq3vKJGk5/0QIrUcAqB5bT5nqLoKM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=P4+jRWkmAA1t8HARlu95ZNiojN1/47rsAyy16VbHP26CGjKmbDNgReQs4panN3USU NfJdg5QMvNotQPzBpcZ1fzWpxpLCW6IaNHq2eYRNyaWZO6CD5wCM/HK0mISNABdNSA Ft1ILY7yUA1cQZymmaTwEg2v9Jv9JRHnwbhV7AomqSXVlL6huxdhwC2w5N5WainzJo qRuCtiU4EHhgvXR652ZT1FQJh2sB+J9ZE2qR13oU97TUf1qbhsG5zL4Rl6O1+2bNlX YfWatccWAqTF1HYNtkz1a9/GiyS/FN1bjwyBbhTt2IWiulV5gDbVd6VAkLdR453zuo HAC8okPc4kilQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Michael Trimarchi , Dario Binacchi Subject: [PATCH 41/69] Input: edt-ft5x06 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:14 +0000 Message-Id: <20230102181842.718010-42-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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 Trimarchi Cc: Dario Binacchi --- drivers/input/touchscreen/edt-ft5x06.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/edt-ft5x06.c b/drivers/input/touchscreen/edt-ft5x06.c index ddd0f1f62458..d09bfeaa7da6 100644 --- a/drivers/input/touchscreen/edt-ft5x06.c +++ b/drivers/input/touchscreen/edt-ft5x06.c @@ -1353,7 +1353,7 @@ static void edt_ft5x06_ts_remove(struct i2c_client *client) edt_ft5x06_ts_teardown_debugfs(tsdata); } -static int __maybe_unused edt_ft5x06_ts_suspend(struct device *dev) +static int edt_ft5x06_ts_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client); @@ -1396,7 +1396,7 @@ static int __maybe_unused edt_ft5x06_ts_suspend(struct device *dev) return 0; } -static int __maybe_unused edt_ft5x06_ts_resume(struct device *dev) +static int edt_ft5x06_ts_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct edt_ft5x06_ts_data *tsdata = i2c_get_clientdata(client); @@ -1459,8 +1459,8 @@ static int __maybe_unused edt_ft5x06_ts_resume(struct device *dev) return ret; } -static SIMPLE_DEV_PM_OPS(edt_ft5x06_ts_pm_ops, - edt_ft5x06_ts_suspend, edt_ft5x06_ts_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(edt_ft5x06_ts_pm_ops, + edt_ft5x06_ts_suspend, edt_ft5x06_ts_resume); static const struct edt_i2c_chip_data edt_ft5x06_data = { .max_support_points = 5, @@ -1500,7 +1500,7 @@ static struct i2c_driver edt_ft5x06_ts_driver = { .driver = { .name = "edt_ft5x06", .of_match_table = edt_ft5x06_of_match, - .pm = &edt_ft5x06_ts_pm_ops, + .pm = pm_sleep_ptr(&edt_ft5x06_ts_pm_ops), .probe_type = PROBE_PREFER_ASYNCHRONOUS, }, .id_table = edt_ft5x06_ts_id, From patchwork Mon Jan 2 18:18:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638644 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 5313AC54E76 for ; Mon, 2 Jan 2023 18:07:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236347AbjABSHT (ORCPT ); Mon, 2 Jan 2023 13:07:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49436 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236500AbjABSGx (ORCPT ); Mon, 2 Jan 2023 13:06:53 -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 EF56C2F5 for ; Mon, 2 Jan 2023 10:06:51 -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 A944FB80DEC for ; Mon, 2 Jan 2023 18:06:50 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B7A8C433EF; Mon, 2 Jan 2023 18:06:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682809; bh=d4MO4Fl+LVtQkwl5qpm268Fadx1u/sLrfvHPk8I0zRo=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Zhjr7UcoYKkadJs5KnYx76vpYh5Z+alzIgjSvWt0tjcNgRcmKvhnkCCwrWHEOZ9cF n1/XBwE8OndB1MPhj8m4Zq7ZBW6lI9WVK531LzP0salBuQuT9sGrxq3lYjXSI4epEu b+0cX88Uh2I1tXCyYQDIyXF/zv95Y2A79PLHdxeguTrPrSjxmfyUBcMo47xSGhwHPB +6kF1xoyOrFoRff5lhpKJZEFREKmXiYYcN0MVArY12EGEbH71bTTNqPfBX1w6AeKUg A4ew0s35cgz1UxvsA9irNdfpAK0Dv3iOXoE0MGoriW4I8R/faC2tIu6cCLPLGisI38 x3nsM/2Fx78yQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Daniel Mack Subject: [PATCH 42/69] Input: eeti_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:15 +0000 Message-Id: <20230102181842.718010-43-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Daniel Mack --- drivers/input/touchscreen/eeti_ts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/eeti_ts.c b/drivers/input/touchscreen/eeti_ts.c index c8ab03f49227..56fa21688bdb 100644 --- a/drivers/input/touchscreen/eeti_ts.c +++ b/drivers/input/touchscreen/eeti_ts.c @@ -232,7 +232,7 @@ static int eeti_ts_probe(struct i2c_client *client) return 0; } -static int __maybe_unused eeti_ts_suspend(struct device *dev) +static int eeti_ts_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct eeti_ts *eeti = i2c_get_clientdata(client); @@ -251,7 +251,7 @@ static int __maybe_unused eeti_ts_suspend(struct device *dev) return 0; } -static int __maybe_unused eeti_ts_resume(struct device *dev) +static int eeti_ts_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct eeti_ts *eeti = i2c_get_clientdata(client); @@ -270,7 +270,7 @@ static int __maybe_unused eeti_ts_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(eeti_ts_pm, eeti_ts_suspend, eeti_ts_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(eeti_ts_pm, eeti_ts_suspend, eeti_ts_resume); static const struct i2c_device_id eeti_ts_id[] = { { "eeti_ts", 0 }, @@ -288,7 +288,7 @@ static const struct of_device_id of_eeti_ts_match[] = { static struct i2c_driver eeti_ts_driver = { .driver = { .name = "eeti_ts", - .pm = &eeti_ts_pm, + .pm = pm_sleep_ptr(&eeti_ts_pm), .of_match_table = of_match_ptr(of_eeti_ts_match), }, .probe_new = eeti_ts_probe, From patchwork Mon Jan 2 18:18:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638633 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 E2FEFC54EBF for ; Mon, 2 Jan 2023 18:07:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236361AbjABSHT (ORCPT ); Mon, 2 Jan 2023 13:07:19 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236502AbjABSGx (ORCPT ); Mon, 2 Jan 2023 13:06:53 -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 9DCD52E2 for ; Mon, 2 Jan 2023 10:06:51 -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 3CE6261084 for ; Mon, 2 Jan 2023 18:06:51 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DC3CBC433F0; Mon, 2 Jan 2023 18:06:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682810; bh=Bfpirfi1/wnNoY0OXjR20imqa1gbuOi0JsIrNeOfC+M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=A7biqdAU1EOqdwZZXE1T5TWfesrJQtKvlY6WtRKAikHcsYP8W2BVowDKvLB7FQncP FOgkCPZ9ss7cPjfplQr5Fbc19zYDk6QJpQ9EsWQaTFOadKMDG4txR0PmNY9dWUDXj4 LASKsF7vZ1yKs8+z3FlYjL7HMdVuv1B9bHpK9HKRPpcvMmEyIWeGFXt+TuN3Ayrn0b I+gV7twoXplxZR7eTfDWDOkUto3z00fuY/6p++D80yrr+bs5R1jnGT5cmZRpr/YBup YlOX/BIR1NdxDDAMjjhnfzyYiziDhgY8wXiPZBJG1My+i6QFiuQLBN2dylkmLu/xCa qclkBpfBLCyDw== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 43/69] Input: egalax_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:16 +0000 Message-Id: <20230102181842.718010-44-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/touchscreen/egalax_ts.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/egalax_ts.c b/drivers/input/touchscreen/egalax_ts.c index 742d47a75ac1..1a9805938e6d 100644 --- a/drivers/input/touchscreen/egalax_ts.c +++ b/drivers/input/touchscreen/egalax_ts.c @@ -223,7 +223,7 @@ static const struct i2c_device_id egalax_ts_id[] = { }; MODULE_DEVICE_TABLE(i2c, egalax_ts_id); -static int __maybe_unused egalax_ts_suspend(struct device *dev) +static int egalax_ts_suspend(struct device *dev) { static const u8 suspend_cmd[MAX_I2C_DATA_LEN] = { 0x3, 0x6, 0xa, 0x3, 0x36, 0x3f, 0x2, 0, 0, 0 @@ -238,7 +238,7 @@ static int __maybe_unused egalax_ts_suspend(struct device *dev) return ret > 0 ? 0 : ret; } -static int __maybe_unused egalax_ts_resume(struct device *dev) +static int egalax_ts_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); @@ -248,7 +248,8 @@ static int __maybe_unused egalax_ts_resume(struct device *dev) return egalax_wake_up_device(client); } -static SIMPLE_DEV_PM_OPS(egalax_ts_pm_ops, egalax_ts_suspend, egalax_ts_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(egalax_ts_pm_ops, + egalax_ts_suspend, egalax_ts_resume); static const struct of_device_id egalax_ts_dt_ids[] = { { .compatible = "eeti,egalax_ts" }, @@ -259,7 +260,7 @@ MODULE_DEVICE_TABLE(of, egalax_ts_dt_ids); static struct i2c_driver egalax_ts_driver = { .driver = { .name = "egalax_ts", - .pm = &egalax_ts_pm_ops, + .pm = pm_sleep_ptr(&egalax_ts_pm_ops), .of_match_table = egalax_ts_dt_ids, }, .id_table = egalax_ts_id, From patchwork Mon Jan 2 18:18:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638641 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 17B65C54EBE for ; Mon, 2 Jan 2023 18:07:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235952AbjABSHV (ORCPT ); Mon, 2 Jan 2023 13:07:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236475AbjABSG4 (ORCPT ); Mon, 2 Jan 2023 13:06:56 -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 C537755BB for ; Mon, 2 Jan 2023 10:06:54 -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 791A4B80DED for ; Mon, 2 Jan 2023 18:06:53 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 12202C433D2; Mon, 2 Jan 2023 18:06:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682812; bh=A+adGC5uX20xMfqb5JGln2JU+zgoaUd7BOyB9DkXiN4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AwxCjGiutQjBNOZASt6LPGlZ4ntLyMzcI69jU1kJ7f5U5G+V9L9ZXUwXIbn3MXTbb eBe9wGv7bqDj1nZ1pvK5j9nXF9N+SQ+Ih+zCMuRCXi0v4ElVlBRvxcjUJQHYVsKO1E /ox2WpZtCfXpdawYfNwRVZV0BeH5ZY83r34Wk/N/4+0vbqqWNyHyxVjRD9vfc4I03/ IjzAUbTJNXgN/HJwVjIGsqOP/yqPXWNQUw8akJl8Xzoab+jV31BFT2iKyqb6dC8hg+ UCYgBUu1QRolmVEEMsTTNpU2Kxhu16DXvbP2cGLd6PmfhwR1odxxVMIZTl0PVaMgYa noMpnMzklLEdw== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , =?utf-8?q?Jonathan_Neusc?= =?utf-8?q?h=C3=A4fer?= , Hans de Goede Subject: [PATCH 44/69] input: ektf2127 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:17 +0000 Message-Id: <20230102181842.718010-45-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Jonathan Neuschäfer Cc: Hans de Goede Reviewed-by: Hans de Goede --- drivers/input/touchscreen/ektf2127.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/ektf2127.c b/drivers/input/touchscreen/ektf2127.c index 328841eaa1b7..e6f1e46d003d 100644 --- a/drivers/input/touchscreen/ektf2127.c +++ b/drivers/input/touchscreen/ektf2127.c @@ -177,7 +177,7 @@ static void ektf2127_stop(struct input_dev *dev) gpiod_set_value_cansleep(ts->power_gpios, 0); } -static int __maybe_unused ektf2127_suspend(struct device *dev) +static int ektf2127_suspend(struct device *dev) { struct ektf2127_ts *ts = i2c_get_clientdata(to_i2c_client(dev)); @@ -189,7 +189,7 @@ static int __maybe_unused ektf2127_suspend(struct device *dev) return 0; } -static int __maybe_unused ektf2127_resume(struct device *dev) +static int ektf2127_resume(struct device *dev) { struct ektf2127_ts *ts = i2c_get_clientdata(to_i2c_client(dev)); @@ -201,8 +201,8 @@ static int __maybe_unused ektf2127_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(ektf2127_pm_ops, ektf2127_suspend, - ektf2127_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(ektf2127_pm_ops, ektf2127_suspend, + ektf2127_resume); static int ektf2127_query_dimension(struct i2c_client *client, bool width) { @@ -348,7 +348,7 @@ MODULE_DEVICE_TABLE(i2c, ektf2127_i2c_id); static struct i2c_driver ektf2127_driver = { .driver = { .name = "elan_ektf2127", - .pm = &ektf2127_pm_ops, + .pm = pm_sleep_ptr(&ektf2127_pm_ops), .of_match_table = of_match_ptr(ektf2127_of_match), }, .probe_new = ektf2127_probe, From patchwork Mon Jan 2 18:18:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638642 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 4E735C54EF1 for ; Mon, 2 Jan 2023 18:07:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236439AbjABSHU (ORCPT ); Mon, 2 Jan 2023 13:07:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49470 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236440AbjABSG4 (ORCPT ); Mon, 2 Jan 2023 13:06:56 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CD992F5 for ; Mon, 2 Jan 2023 10:06:54 -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 197DC61038 for ; Mon, 2 Jan 2023 18:06:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8B7F6C433F0; Mon, 2 Jan 2023 18:06:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682813; bh=Q6SeAcYj+zkhpFnXxlYMG9Y1KqQ5hi0Qo7CJ5UiuGh0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JyBIdzpPlHSmARpjXxB+09UgvjxwZ+akgXJNzCAxKXerVHGeHX30fnh3pI+LtfgGH ZI5VVOw/BSrNwAqiXlYReDC1zVnJsEij7uQRE7KrvYYFghXYBpvFya/8PgmH6yrHzv DMFfLFY5GbyxItOVvaDUkKCdntoK5MPScG8zSQbpQ/BLCXtFNLG4PpvnB0tRuJSId4 gLp5oBsDtHxIbGiSwJ92Kfp8Sb45QEg0OJtB7B8t2at0WueyE7OhoNPikWZSrsYtLe BQDONdbNkOo/WkLst9c9NrVZ0Wrm73d1bW970J5KZTYP5Mo9Po3eQTuHkvFTFoQKHk AVW78LFMnjH/Q== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Douglas Anderson Subject: [PATCH 45/69] Input: elants_i2c - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:18 +0000 Message-Id: <20230102181842.718010-46-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Douglas Anderson --- drivers/input/touchscreen/elants_i2c.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/elants_i2c.c b/drivers/input/touchscreen/elants_i2c.c index 5452b50f8a77..8a16eb51481f 100644 --- a/drivers/input/touchscreen/elants_i2c.c +++ b/drivers/input/touchscreen/elants_i2c.c @@ -1572,7 +1572,7 @@ static int elants_i2c_probe(struct i2c_client *client) return 0; } -static int __maybe_unused elants_i2c_suspend(struct device *dev) +static int elants_i2c_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct elants_data *ts = i2c_get_clientdata(client); @@ -1611,7 +1611,7 @@ static int __maybe_unused elants_i2c_suspend(struct device *dev) return 0; } -static int __maybe_unused elants_i2c_resume(struct device *dev) +static int elants_i2c_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct elants_data *ts = i2c_get_clientdata(client); @@ -1644,8 +1644,8 @@ static int __maybe_unused elants_i2c_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(elants_i2c_pm_ops, - elants_i2c_suspend, elants_i2c_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(elants_i2c_pm_ops, + elants_i2c_suspend, elants_i2c_resume); static const struct i2c_device_id elants_i2c_id[] = { { DEVICE_NAME, EKTH3500 }, @@ -1677,7 +1677,7 @@ static struct i2c_driver elants_i2c_driver = { .id_table = elants_i2c_id, .driver = { .name = DEVICE_NAME, - .pm = &elants_i2c_pm_ops, + .pm = pm_sleep_ptr(&elants_i2c_pm_ops), .acpi_match_table = ACPI_PTR(elants_acpi_id), .of_match_table = of_match_ptr(elants_of_match), .probe_type = PROBE_PREFER_ASYNCHRONOUS, From patchwork Mon Jan 2 18:18:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638639 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 2A241C54EF0 for ; Mon, 2 Jan 2023 18:07:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236440AbjABSHV (ORCPT ); Mon, 2 Jan 2023 13:07:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49496 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236490AbjABSG7 (ORCPT ); Mon, 2 Jan 2023 13:06:59 -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 8C65A116B for ; Mon, 2 Jan 2023 10:06:57 -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 414C1B80DEC for ; Mon, 2 Jan 2023 18:06:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id E0292C433EF; Mon, 2 Jan 2023 18:06:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682815; bh=DIMShl4zaE2YV+7C0HGEGNxIMwfKzQ/0f0VBb7kDREw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tiWR/X9bBKkTVhvZSo1ggYOfQe1o/jL4+fGSbm6R1H5cwVZow3nP9EFrnLj9eFTOv AHQhE+9gYNa3akIxgXCt71zBI1NnO9dXS+rJMjNcnkb6Ycqq8PfCzjOyeNJpbrCDXf P+lU4DxEVqDXXqwb+Ndah3ULwxooczI1iTsAeK9QfGSsR9T9KWaBItFZVRkfq990wH MRq725ok4ePrNeJgv3vWVPACOAiPC2RgjDRubkdlPWV6p5RA/znETyYSWG2rZ8j4sD pRdr+dm1NfkcuBlih90uaCBvHOeYi7uw6IvTp1XaixjF0eizeKUN1rgeuV0/pM3Q8P Vwew9Z6bu/uvQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Hans de Goede , Bastien Nocera Subject: [PATCH 46/69] Input: goodix - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:19 +0000 Message-Id: <20230102181842.718010-47-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Hans de Goede Cc: Bastien Nocera --- drivers/input/touchscreen/goodix.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/goodix.c b/drivers/input/touchscreen/goodix.c index 8a0a8078de8f..b348172f19c3 100644 --- a/drivers/input/touchscreen/goodix.c +++ b/drivers/input/touchscreen/goodix.c @@ -1401,7 +1401,7 @@ static void goodix_ts_remove(struct i2c_client *client) wait_for_completion(&ts->firmware_loading_complete); } -static int __maybe_unused goodix_suspend(struct device *dev) +static int goodix_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct goodix_ts_data *ts = i2c_get_clientdata(client); @@ -1448,7 +1448,7 @@ static int __maybe_unused goodix_suspend(struct device *dev) return 0; } -static int __maybe_unused goodix_resume(struct device *dev) +static int goodix_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct goodix_ts_data *ts = i2c_get_clientdata(client); @@ -1497,7 +1497,7 @@ static int __maybe_unused goodix_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(goodix_pm_ops, goodix_suspend, goodix_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(goodix_pm_ops, goodix_suspend, goodix_resume); static const struct i2c_device_id goodix_ts_id[] = { { "GDIX1001:00", 0 }, @@ -1543,7 +1543,7 @@ static struct i2c_driver goodix_ts_driver = { .name = "Goodix-TS", .acpi_match_table = ACPI_PTR(goodix_acpi_match), .of_match_table = of_match_ptr(goodix_of_match), - .pm = &goodix_pm_ops, + .pm = pm_sleep_ptr(&goodix_pm_ops), }, }; module_i2c_driver(goodix_ts_driver); From patchwork Mon Jan 2 18:18:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639128 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 4D92FC63705 for ; Mon, 2 Jan 2023 18:07:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236473AbjABSHY (ORCPT ); Mon, 2 Jan 2023 13:07:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236517AbjABSG7 (ORCPT ); Mon, 2 Jan 2023 13:06:59 -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 6C0532F5 for ; Mon, 2 Jan 2023 10:06:57 -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 E79D461038 for ; Mon, 2 Jan 2023 18:06:56 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 66E0BC433D2; Mon, 2 Jan 2023 18:06:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682816; bh=78iLIx8k83FMNuPJTRiPoDvs1BszJFYIUVQkTlbfYd4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TTAfdudNQXerk3tZ9DfFBupP5e4Undd0sb8qVJLdRaivAB76seWyGxTs4GohIwg9K EpChhymiQRO6vqvGkm7dXIw2fTb4cM4lXBIvVkDsLGLfkRpwWjNjhwqz/NwyoDaAZB nU/YcHhF7yn39GfNF6sG48UfJycVZthjfrH3lRZnoJw8TfoBTh8g+fZTpAcJS4mDBJ JDvTumYy4FHBjty6Y1w+WpOvqf0qcp4iRf/poEGYO0fhFFpdUxzhOwv5cjN08z8gIM xkVUQO5tuMYioZRAX008FOgHw8PnCJvuh1qokA/E5OyAg5PJKYoCI3E2Bq4pFgwitE gAeYHFhhuQjsg== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Anthony Kim Subject: [PATCH 47/69] Input: hideep - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:20 +0000 Message-Id: <20230102181842.718010-48-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Anthony Kim --- drivers/input/touchscreen/hideep.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/hideep.c b/drivers/input/touchscreen/hideep.c index ff4bb4c14898..bd454d93f1f7 100644 --- a/drivers/input/touchscreen/hideep.c +++ b/drivers/input/touchscreen/hideep.c @@ -959,7 +959,7 @@ static const struct attribute_group hideep_ts_attr_group = { .attrs = hideep_ts_sysfs_entries, }; -static int __maybe_unused hideep_suspend(struct device *dev) +static int hideep_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct hideep_ts *ts = i2c_get_clientdata(client); @@ -970,7 +970,7 @@ static int __maybe_unused hideep_suspend(struct device *dev) return 0; } -static int __maybe_unused hideep_resume(struct device *dev) +static int hideep_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct hideep_ts *ts = i2c_get_clientdata(client); @@ -987,7 +987,7 @@ static int __maybe_unused hideep_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(hideep_pm_ops, hideep_suspend, hideep_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(hideep_pm_ops, hideep_suspend, hideep_resume); static const struct regmap_config hideep_regmap_config = { .reg_bits = 16, @@ -1108,7 +1108,7 @@ static struct i2c_driver hideep_driver = { .name = HIDEEP_I2C_NAME, .of_match_table = of_match_ptr(hideep_match_table), .acpi_match_table = ACPI_PTR(hideep_acpi_id), - .pm = &hideep_pm_ops, + .pm = pm_sleep_ptr(&hideep_pm_ops), }, .id_table = hideep_i2c_id, .probe_new = hideep_probe, From patchwork Mon Jan 2 18:18:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638635 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 1B2B2C61DB3 for ; Mon, 2 Jan 2023 18:07:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236457AbjABSHW (ORCPT ); Mon, 2 Jan 2023 13:07:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49510 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236528AbjABSHB (ORCPT ); Mon, 2 Jan 2023 13:07:01 -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 547B35F96 for ; Mon, 2 Jan 2023 10:07:00 -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 09EA5B80DEC for ; Mon, 2 Jan 2023 18:06:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id B91B8C433EF; Mon, 2 Jan 2023 18:06:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682817; bh=1fZtWpowuzcKXpQvaRbYJ021cC9TtqN2quRW9UcPSU0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Bup5IjrhccUfntyyVqpeMgJWfGkkzf2v6/GVVj03+WxWWhBzOqtOwhBWIE8o6pZNI yzgQOkUTnjtL/cOPQ0hwCTjMfkZsxP1S5oQR02vrytwtkWgIhzPj82wqAtAjJWr71s XMj0t4THApsKpFNP46EpP2AqG1VdEwXvfR89XLePApsYLDhmelvJnepvEFum+XzI0D J/02iLFCUJ9+S1joHaUmjXPbSmIjGXyoW4JsJbRA/+uZe0wUGUTQmlCBFwsrABAYl6 +eyF87t1CqnVD5BKtflhacxWlXN044iebPom0brka5iO5febXuF0TmGvQkBotYuntW rMytBKCylGqFg== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Joe Hung Subject: [PATCH 48/69] Input: ilitek_ts_i2c - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:21 +0000 Message-Id: <20230102181842.718010-49-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Joe Hung --- drivers/input/touchscreen/ilitek_ts_i2c.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/ilitek_ts_i2c.c b/drivers/input/touchscreen/ilitek_ts_i2c.c index e6ade3775a8a..d69809338498 100644 --- a/drivers/input/touchscreen/ilitek_ts_i2c.c +++ b/drivers/input/touchscreen/ilitek_ts_i2c.c @@ -604,7 +604,7 @@ static int ilitek_ts_i2c_probe(struct i2c_client *client) return 0; } -static int __maybe_unused ilitek_suspend(struct device *dev) +static int ilitek_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct ilitek_ts_data *ts = i2c_get_clientdata(client); @@ -621,7 +621,7 @@ static int __maybe_unused ilitek_suspend(struct device *dev) return 0; } -static int __maybe_unused ilitek_resume(struct device *dev) +static int ilitek_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct ilitek_ts_data *ts = i2c_get_clientdata(client); @@ -640,7 +640,7 @@ static int __maybe_unused ilitek_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(ilitek_pm_ops, ilitek_suspend, ilitek_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(ilitek_pm_ops, ilitek_suspend, ilitek_resume); static const struct i2c_device_id ilitek_ts_i2c_id[] = { { ILITEK_TS_NAME, 0 }, @@ -675,7 +675,7 @@ MODULE_DEVICE_TABLE(of, ilitek_ts_i2c_match); static struct i2c_driver ilitek_ts_i2c_driver = { .driver = { .name = ILITEK_TS_NAME, - .pm = &ilitek_pm_ops, + .pm = pm_sleep_ptr(&ilitek_pm_ops), .of_match_table = of_match_ptr(ilitek_ts_i2c_match), .acpi_match_table = ACPI_PTR(ilitekts_acpi_id), }, From patchwork Mon Jan 2 18:18:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639124 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 C776EC63797 for ; Mon, 2 Jan 2023 18:07:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236360AbjABSHZ (ORCPT ); Mon, 2 Jan 2023 13:07:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49508 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236530AbjABSHB (ORCPT ); Mon, 2 Jan 2023 13:07:01 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2685BDAD for ; Mon, 2 Jan 2023 10:07:00 -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 9379461090 for ; Mon, 2 Jan 2023 18:06:59 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1607EC433F0; Mon, 2 Jan 2023 18:06:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682819; bh=OpLp46EogIxb5OGUTW6thnW7f1HE9c0MSmMVIedzrgI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lI8cC7beBsvHLyG6bP8WkAL5T3878//WobUVFFLzlAzdWE4WXXnglk+MaFel039Nl 444MsIo+tWFLtYqnEMHa+ok5z5pX+xUr63OD5gqEXoKxCS1Sm4QaSTUoLEH+0ORQfP M4gv68wP36ofUAInkyz/8CpAYpbwtRh6spbKhvmASynrEeziTULclU/GteP/vIyU7y u5/+Dg4clmA7o+VLIclj6j5wuOdvIRf2+nbeZaxJgMwUcm2/eiiHkdn7039B+NRRdt j9FOrcX0wAjsAQ4m1/raLdxFIXV7397Y+J5mVkhz8L4sY5DEdD5Wm/aOcPk1+gtyIN 54K1Kgu/GsbOg== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Markuss Broks Subject: [PATCH 49/69] Input: imagis - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:22 +0000 Message-Id: <20230102181842.718010-50-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Markuss Broks --- drivers/input/touchscreen/imagis.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/imagis.c b/drivers/input/touchscreen/imagis.c index e2697e6c6d2a..de1b16e94bb8 100644 --- a/drivers/input/touchscreen/imagis.c +++ b/drivers/input/touchscreen/imagis.c @@ -309,7 +309,7 @@ static int imagis_probe(struct i2c_client *i2c) return 0; } -static int __maybe_unused imagis_suspend(struct device *dev) +static int imagis_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct imagis_ts *ts = i2c_get_clientdata(client); @@ -325,7 +325,7 @@ static int __maybe_unused imagis_suspend(struct device *dev) return retval; } -static int __maybe_unused imagis_resume(struct device *dev) +static int imagis_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct imagis_ts *ts = i2c_get_clientdata(client); @@ -341,7 +341,7 @@ static int __maybe_unused imagis_resume(struct device *dev) return retval; } -static SIMPLE_DEV_PM_OPS(imagis_pm_ops, imagis_suspend, imagis_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(imagis_pm_ops, imagis_suspend, imagis_resume); #ifdef CONFIG_OF static const struct of_device_id imagis_of_match[] = { @@ -354,7 +354,7 @@ MODULE_DEVICE_TABLE(of, imagis_of_match); static struct i2c_driver imagis_ts_driver = { .driver = { .name = "imagis-touchscreen", - .pm = &imagis_pm_ops, + .pm = pm_sleep_ptr(&imagis_pm_ops), .of_match_table = of_match_ptr(imagis_of_match), }, .probe_new = imagis_probe, From patchwork Mon Jan 2 18:18:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638638 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 8217EC63709 for ; Mon, 2 Jan 2023 18:07:24 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236240AbjABSHX (ORCPT ); Mon, 2 Jan 2023 13:07:23 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236531AbjABSHB (ORCPT ); Mon, 2 Jan 2023 13:07:01 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5795B55BB for ; Mon, 2 Jan 2023 10:07:01 -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 E8B4D6109A for ; Mon, 2 Jan 2023 18:07:00 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 69897C433D2; Mon, 2 Jan 2023 18:06:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682820; bh=xAi+7u5NdVL5XhTqxWwYWwytmJV0HunHgi/Awgbixyk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=CVGBRV0PetQYLsQwnvWsbGi8QFZIDnheY3o6Vi+RMHJW1zIyib5E2Fgf+aRub6SJI qfNNBb9eGlrJtLPq7t73yZ0FbSaJsAe1cbcOSNW3TVOjJe3AzeOg7qtG8N33BTcVmD xKQkUwEP5HhhstHM1oWkyD7mOWmw7afTmnH8GEMEAxNPEuuNXs7SNcuiP0wqFWND4B g99iXldj+KT82HARILiutP4tDLRbEKzpTdBm3qLeP9HMDgtknu2+0CwT9/JVRGxaNg 8kmkvvqkyTTxLcJdIppvzPPhlOyLeBXgusAoK0aeb3JyOFx478IW12Roq3Env4aZ0W 0+XidlZSZh4XQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Haibo Chen Subject: [PATCH 50/69] Input: imx6ul_tsc - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:23 +0000 Message-Id: <20230102181842.718010-51-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Haibo Chen --- drivers/input/touchscreen/imx6ul_tsc.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/imx6ul_tsc.c b/drivers/input/touchscreen/imx6ul_tsc.c index 2d4facf70cdb..6ac8fa84ed9f 100644 --- a/drivers/input/touchscreen/imx6ul_tsc.c +++ b/drivers/input/touchscreen/imx6ul_tsc.c @@ -512,7 +512,7 @@ static int imx6ul_tsc_probe(struct platform_device *pdev) return 0; } -static int __maybe_unused imx6ul_tsc_suspend(struct device *dev) +static int imx6ul_tsc_suspend(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct imx6ul_tsc *tsc = platform_get_drvdata(pdev); @@ -528,7 +528,7 @@ static int __maybe_unused imx6ul_tsc_suspend(struct device *dev) return 0; } -static int __maybe_unused imx6ul_tsc_resume(struct device *dev) +static int imx6ul_tsc_resume(struct device *dev) { struct platform_device *pdev = to_platform_device(dev); struct imx6ul_tsc *tsc = platform_get_drvdata(pdev); @@ -545,8 +545,8 @@ static int __maybe_unused imx6ul_tsc_resume(struct device *dev) return retval; } -static SIMPLE_DEV_PM_OPS(imx6ul_tsc_pm_ops, - imx6ul_tsc_suspend, imx6ul_tsc_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(imx6ul_tsc_pm_ops, + imx6ul_tsc_suspend, imx6ul_tsc_resume); static const struct of_device_id imx6ul_tsc_match[] = { { .compatible = "fsl,imx6ul-tsc", }, @@ -558,7 +558,7 @@ static struct platform_driver imx6ul_tsc_driver = { .driver = { .name = "imx6ul-tsc", .of_match_table = imx6ul_tsc_match, - .pm = &imx6ul_tsc_pm_ops, + .pm = pm_sleep_ptr(&imx6ul_tsc_pm_ops), }, .probe = imx6ul_tsc_probe, }; From patchwork Mon Jan 2 18:18:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639122 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 5A189C3DA7A for ; Mon, 2 Jan 2023 18:07:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236479AbjABSHZ (ORCPT ); Mon, 2 Jan 2023 13:07:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236534AbjABSHF (ORCPT ); Mon, 2 Jan 2023 13:07:05 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 62DADDB1 for ; Mon, 2 Jan 2023 10:07:04 -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 13A58B80DF0 for ; Mon, 2 Jan 2023 18:07:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C0086C433EF; Mon, 2 Jan 2023 18:07:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682821; bh=jWijrKeYCGjamKjpO42XPQkqBGuRvod0lS5P3mSEp4M=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tX0akr+djH5OFgY2REHQZbuuk3wbkAR6Vv7Xqeptfqlr2y5S6YEXNkiCPSsXxp/rg sIKFtTgiauYl1Ugj7+5K9opayJ2gljjqN8nGS5Vbls8DFM7NQEaDbmG3Itbad88nXJ SRONtiAVEHMjnD8AQOlsOKGRmXon7OJKD45AmkezVcjoe0wK9SIHGdnkLT1x5i9NmX RsQF/hB+W4CABaMmEvRPWHWWQrttXXrItS+S4Bt97qxadBtEqjBLES/0ZGkdapvEqV ag0pTfaGydv/KQLAW3/P8KH7Nsgz3N+hMLZbwcUZ/CbPQpUJPuUylFjV8qYn71stOp j4P2yDT1WV4Vg== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Jeff LaBundy Subject: [PATCH 51/69] Input: iqs5xx - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:24 +0000 Message-Id: <20230102181842.718010-52-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Jeff LaBundy --- drivers/input/touchscreen/iqs5xx.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/iqs5xx.c b/drivers/input/touchscreen/iqs5xx.c index dc3137a34f35..c73e9c5c0077 100644 --- a/drivers/input/touchscreen/iqs5xx.c +++ b/drivers/input/touchscreen/iqs5xx.c @@ -979,7 +979,7 @@ static const struct attribute_group iqs5xx_attr_group = { .attrs = iqs5xx_attrs, }; -static int __maybe_unused iqs5xx_suspend(struct device *dev) +static int iqs5xx_suspend(struct device *dev) { struct iqs5xx_private *iqs5xx = dev_get_drvdata(dev); struct input_dev *input = iqs5xx->input; @@ -998,7 +998,7 @@ static int __maybe_unused iqs5xx_suspend(struct device *dev) return error; } -static int __maybe_unused iqs5xx_resume(struct device *dev) +static int iqs5xx_resume(struct device *dev) { struct iqs5xx_private *iqs5xx = dev_get_drvdata(dev); struct input_dev *input = iqs5xx->input; @@ -1017,7 +1017,7 @@ static int __maybe_unused iqs5xx_resume(struct device *dev) return error; } -static SIMPLE_DEV_PM_OPS(iqs5xx_pm, iqs5xx_suspend, iqs5xx_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(iqs5xx_pm, iqs5xx_suspend, iqs5xx_resume); static int iqs5xx_probe(struct i2c_client *client) { @@ -1090,7 +1090,7 @@ static struct i2c_driver iqs5xx_i2c_driver = { .driver = { .name = "iqs5xx", .of_match_table = iqs5xx_of_match, - .pm = &iqs5xx_pm, + .pm = pm_sleep_ptr(&iqs5xx_pm), }, .id_table = iqs5xx_id, .probe_new = iqs5xx_probe, From patchwork Mon Jan 2 18:18:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638634 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 7FE0CC63707 for ; Mon, 2 Jan 2023 18:07:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236480AbjABSHZ (ORCPT ); Mon, 2 Jan 2023 13:07:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236495AbjABSHE (ORCPT ); Mon, 2 Jan 2023 13:07:04 -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 D5324DAD for ; Mon, 2 Jan 2023 10:07:03 -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 7219261090 for ; Mon, 2 Jan 2023 18:07:03 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1E1DEC433D2; Mon, 2 Jan 2023 18:07:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682822; bh=V97y/4xYbFUsag90T3R8pWIjov8QCz4DCEl+aFdulVQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=aQImDPDzVOpxSWMoooRUF6EhxGk3ve2/K0v/5UGpoPjBw0CPex67FAdF1j+QMYHo4 AFZg/5xLm3Vt3DeeOCBcx2mzUHKdwg1CCchOy4REQSED1WlmrjX6scgrvNLkNzZNLY aSEW5BXU6o8knZs1agiPlnU930oH+oOoVw7E0g/oSNd2GHONrzdeGtJvJ7FxSsSdWk LnZLHQVhLRS0J13U/BM16xl3UXVme/E3w41ypSIjDLH3dlkKwsClLxzyH2cSWOq4b0 oa0ybRCaH83Tm8lY8Rwc9I7h+oQevtW4/g2KHfGqpeG7+EGI9MJN4xdlNIgPWoqnpL dgdLvXX7qvECQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 52/69] Input: mcs5000_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:25 +0000 Message-Id: <20230102181842.718010-53-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/touchscreen/mcs5000_ts.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/mcs5000_ts.c b/drivers/input/touchscreen/mcs5000_ts.c index ea9517cad695..704e36087ca2 100644 --- a/drivers/input/touchscreen/mcs5000_ts.c +++ b/drivers/input/touchscreen/mcs5000_ts.c @@ -241,7 +241,7 @@ static int mcs5000_ts_probe(struct i2c_client *client) return 0; } -static int __maybe_unused mcs5000_ts_suspend(struct device *dev) +static int mcs5000_ts_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); @@ -251,7 +251,7 @@ static int __maybe_unused mcs5000_ts_suspend(struct device *dev) return 0; } -static int __maybe_unused mcs5000_ts_resume(struct device *dev) +static int mcs5000_ts_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct mcs5000_ts_data *data = i2c_get_clientdata(client); @@ -262,7 +262,8 @@ static int __maybe_unused mcs5000_ts_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(mcs5000_ts_pm, mcs5000_ts_suspend, mcs5000_ts_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(mcs5000_ts_pm, + mcs5000_ts_suspend, mcs5000_ts_resume); static const struct i2c_device_id mcs5000_ts_id[] = { { "mcs5000_ts", 0 }, @@ -274,7 +275,7 @@ static struct i2c_driver mcs5000_ts_driver = { .probe_new = mcs5000_ts_probe, .driver = { .name = "mcs5000_ts", - .pm = &mcs5000_ts_pm, + .pm = pm_sleep_ptr(&mcs5000_ts_pm), }, .id_table = mcs5000_ts_id, }; From patchwork Mon Jan 2 18:18:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638632 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 DF652C677F0 for ; Mon, 2 Jan 2023 18:07:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236490AbjABSH1 (ORCPT ); Mon, 2 Jan 2023 13:07:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236543AbjABSHH (ORCPT ); Mon, 2 Jan 2023 13:07:07 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D04DCDB1 for ; Mon, 2 Jan 2023 10:07:06 -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 81DD9B80DF1 for ; Mon, 2 Jan 2023 18:07:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 48EA4C433F1; Mon, 2 Jan 2023 18:07:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682824; bh=XLU9Se8YrY4ehr2z+FI0cF0zuYf5sdDf7ODC2YjDrVc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JeUJ/NtZSX9AeBe2zNMlr0rLqfNI4A1imI16A5TS/7r2rhzBoabZmTK+NU4AMLDzW J76GRdpMatJAZOMBxQrf9UVg8uB9we0r7VrB8UDhL0Yac9aLtOF8NtYDQmzg5DtH35 92PzSKdSmog1cCK+Pz86vnUeERvANPDQozEQ7pe4tls+wBJRW+AVsXhLabb4yiCHKk 3cveQy7MQeXQrrdkvixPBHCPyUq7eCPxccwYswHYf3aA2HDD9h1PijjlrKZQjB7P8o A4uyerMMXdFx1JXwi9jdfZZtg5dBYmFzubuma18E2eI+UR+1rWrxleySw17TfFez6G qQdN4RKWQ4hbQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Sangwon Jee Subject: [PATCH 53/69] Input: melfas_mip4 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:26 +0000 Message-Id: <20230102181842.718010-54-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Sangwon Jee --- drivers/input/touchscreen/melfas_mip4.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/melfas_mip4.c b/drivers/input/touchscreen/melfas_mip4.c index 4ee8ed4c930c..acdfbdea2b6e 100644 --- a/drivers/input/touchscreen/melfas_mip4.c +++ b/drivers/input/touchscreen/melfas_mip4.c @@ -1528,7 +1528,7 @@ static int mip4_probe(struct i2c_client *client) return 0; } -static int __maybe_unused mip4_suspend(struct device *dev) +static int mip4_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct mip4_ts *ts = i2c_get_clientdata(client); @@ -1546,7 +1546,7 @@ static int __maybe_unused mip4_suspend(struct device *dev) return 0; } -static int __maybe_unused mip4_resume(struct device *dev) +static int mip4_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct mip4_ts *ts = i2c_get_clientdata(client); @@ -1564,7 +1564,7 @@ static int __maybe_unused mip4_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(mip4_pm_ops, mip4_suspend, mip4_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(mip4_pm_ops, mip4_suspend, mip4_resume); #ifdef CONFIG_OF static const struct of_device_id mip4_of_match[] = { @@ -1595,7 +1595,7 @@ static struct i2c_driver mip4_driver = { .name = MIP4_DEVICE_NAME, .of_match_table = of_match_ptr(mip4_of_match), .acpi_match_table = ACPI_PTR(mip4_acpi_match), - .pm = &mip4_pm_ops, + .pm = pm_sleep_ptr(&mip4_pm_ops), }, }; module_i2c_driver(mip4_driver); From patchwork Mon Jan 2 18:18:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639125 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 6ECFEC64981 for ; Mon, 2 Jan 2023 18:07:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236354AbjABSH0 (ORCPT ); Mon, 2 Jan 2023 13:07:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49542 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236541AbjABSHG (ORCPT ); Mon, 2 Jan 2023 13:07:06 -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 5CB6C2E2 for ; Mon, 2 Jan 2023 10:07:06 -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 F082961084 for ; Mon, 2 Jan 2023 18:07:05 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C180C433EF; Mon, 2 Jan 2023 18:07:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682825; bh=OJIoV+HcGll9TYddayhFSQT37QbfYXxlNbkCQsuoV/8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qeMEycqEeUmfWU2PNaQpGXda3HBipV6s6IHjLGSk3BC3/WL31DalF5Q8R15yunsnk pVygmwPY0tOg3xC53zrc7fOsLuS/bwieCsfv5I33mXTOTAyICyY1U6Ix20LUpZP2OP 2OZkcraQPTAbRb1cZM8TlSCgC3De1M3twAWSSvhdwZrFx82eyUdeTgbCYx42JlEN1Y QSoGtAJ5JWJOOFP2WTcmtFyYhKEDTR6lmdjuBemFupqB+tG8MvW9t9qz9+pa0tiERV i1GBtbPRClYa//TxiZkX1BvwzttPNuKBZxc1SJvZ4FabRVmRQtNF2wD73rPnQNU+Nr 6xuAI5Mt6b/RQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 54/69] input: migor_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:27 +0000 Message-Id: <20230102181842.718010-55-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/touchscreen/migor_ts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/migor_ts.c b/drivers/input/touchscreen/migor_ts.c index ff0f605f3a3a..69fcc88d4f80 100644 --- a/drivers/input/touchscreen/migor_ts.c +++ b/drivers/input/touchscreen/migor_ts.c @@ -186,7 +186,7 @@ static void migor_ts_remove(struct i2c_client *client) dev_set_drvdata(&client->dev, NULL); } -static int __maybe_unused migor_ts_suspend(struct device *dev) +static int migor_ts_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct migor_ts_priv *priv = i2c_get_clientdata(client); @@ -197,7 +197,7 @@ static int __maybe_unused migor_ts_suspend(struct device *dev) return 0; } -static int __maybe_unused migor_ts_resume(struct device *dev) +static int migor_ts_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct migor_ts_priv *priv = i2c_get_clientdata(client); @@ -208,7 +208,7 @@ static int __maybe_unused migor_ts_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(migor_ts_pm, migor_ts_suspend, migor_ts_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(migor_ts_pm, migor_ts_suspend, migor_ts_resume); static const struct i2c_device_id migor_ts_id[] = { { "migor_ts", 0 }, @@ -219,7 +219,7 @@ MODULE_DEVICE_TABLE(i2c, migor_ts_id); static struct i2c_driver migor_ts_driver = { .driver = { .name = "migor_ts", - .pm = &migor_ts_pm, + .pm = pm_sleep_ptr(&migor_ts_pm), }, .probe_new = migor_ts_probe, .remove = migor_ts_remove, From patchwork Mon Jan 2 18:18:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638637 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 6AF17C6379F for ; Mon, 2 Jan 2023 18:07:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236502AbjABSH1 (ORCPT ); Mon, 2 Jan 2023 13:07:27 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236553AbjABSHJ (ORCPT ); Mon, 2 Jan 2023 13:07:09 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3B1DB116B for ; Mon, 2 Jan 2023 10:07: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 D8A14B80DED for ; Mon, 2 Jan 2023 18:07:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C58E7C433D2; Mon, 2 Jan 2023 18:07:05 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682826; bh=BNEwtmTr1jjEY9u9KTxA6Wz7K+aEyIiTKh8//mO50Sg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=D1SnFA4kUCaxZUsqRb1Sf9VLxZAeyvqvj90qdh/PEDWZJ9fNha8hfAZhS/E1RduOO de07QgPPtSPFqFV8V7BmotiVwPzlf27S+7B0+DuqFzyedryUT4Ha7YReSfC/ou8WwH zXc7PEiMB0pmo+rvItAfuSsz+O/gqrJp7cgiaSHalcJYrAezyq9P29bGAq0pj8kxB6 e8uE/cL/1fEVkfsMJV/869wG5bRL8EVqYQ7Wa10bgQUb1i03SZGiNsOEGOwSAleTQK Vc+/lds+Yx+gBnVhso+TrkmHd6OTVVZw5CZX/vTN+Mf1w1II6YGsiRK06YfXHguena kuK0HZaDK3CvQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 55/69] Input: mms114 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:28 +0000 Message-Id: <20230102181842.718010-56-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/touchscreen/mms114.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/mms114.c b/drivers/input/touchscreen/mms114.c index 758b669391a7..4dbca1aad89d 100644 --- a/drivers/input/touchscreen/mms114.c +++ b/drivers/input/touchscreen/mms114.c @@ -557,7 +557,7 @@ static int mms114_probe(struct i2c_client *client) return 0; } -static int __maybe_unused mms114_suspend(struct device *dev) +static int mms114_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct mms114_data *data = i2c_get_clientdata(client); @@ -581,7 +581,7 @@ static int __maybe_unused mms114_suspend(struct device *dev) return 0; } -static int __maybe_unused mms114_resume(struct device *dev) +static int mms114_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct mms114_data *data = i2c_get_clientdata(client); @@ -601,7 +601,7 @@ static int __maybe_unused mms114_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(mms114_pm_ops, mms114_suspend, mms114_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(mms114_pm_ops, mms114_suspend, mms114_resume); static const struct i2c_device_id mms114_id[] = { { "mms114", 0 }, @@ -635,7 +635,7 @@ MODULE_DEVICE_TABLE(of, mms114_dt_match); static struct i2c_driver mms114_driver = { .driver = { .name = "mms114", - .pm = &mms114_pm_ops, + .pm = pm_sleep_ptr(&mms114_pm_ops), .of_match_table = of_match_ptr(mms114_dt_match), }, .probe_new = mms114_probe, From patchwork Mon Jan 2 18:18:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639127 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 C8849C678D6 for ; Mon, 2 Jan 2023 18:07:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236362AbjABSH2 (ORCPT ); Mon, 2 Jan 2023 13:07:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236557AbjABSHM (ORCPT ); Mon, 2 Jan 2023 13:07:12 -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 85EC92E2 for ; Mon, 2 Jan 2023 10:07: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 30E79B80DF0 for ; Mon, 2 Jan 2023 18:07:09 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EF1B7C433EF; Mon, 2 Jan 2023 18:07:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682827; bh=/FR+gxDCwvqrk6XzyZSWBM2i8Gaz+adNRvhAyRiFtTU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=WuYUrUIlsPHi0GB5L2YRQPoYtIu2V8tdE61tWioZp+bandgaDM8j9UTJKL+BFSLk/ nQX3T0bPauzUTPdX57bcFjsmumtj1PfhzTN86OVl83T+4uBxAbV73NxBI4C9JIq9w6 PRcMlsaBdFW3KkPMyvOZDGP6Gjchnj8PQWJzUxk1Z/+ER1EfKQamF6n0OihdSfUEfH KUV0A8kYQ/JSENNRtqUchitjbsMv6JrfcesuwhXdF6FDCS5Q2cegDw8Q2I/FPjP7at jxdWx6rhKiC4NnzPyi7xsJjB6i+SsLMh17yGiXPPCBGt8YlYLe2NAZR/hE7ZUxsbBD RjwGXFDQcNTQQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Vincent Knecht Subject: [PATCH 56/69] Input: msg2638 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:29 +0000 Message-Id: <20230102181842.718010-57-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Vincent Knecht --- drivers/input/touchscreen/msg2638.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/msg2638.c b/drivers/input/touchscreen/msg2638.c index 4c0816b09d33..b23db689d995 100644 --- a/drivers/input/touchscreen/msg2638.c +++ b/drivers/input/touchscreen/msg2638.c @@ -441,7 +441,7 @@ static int msg2638_ts_probe(struct i2c_client *client) return 0; } -static int __maybe_unused msg2638_suspend(struct device *dev) +static int msg2638_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct msg2638_ts_data *msg2638 = i2c_get_clientdata(client); @@ -456,7 +456,7 @@ static int __maybe_unused msg2638_suspend(struct device *dev) return 0; } -static int __maybe_unused msg2638_resume(struct device *dev) +static int msg2638_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct msg2638_ts_data *msg2638 = i2c_get_clientdata(client); @@ -472,7 +472,7 @@ static int __maybe_unused msg2638_resume(struct device *dev) return ret; } -static SIMPLE_DEV_PM_OPS(msg2638_pm_ops, msg2638_suspend, msg2638_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(msg2638_pm_ops, msg2638_suspend, msg2638_resume); static const struct msg_chip_data msg2138_data = { .irq_handler = msg2138_ts_irq_handler, @@ -495,7 +495,7 @@ static struct i2c_driver msg2638_ts_driver = { .probe_new = msg2638_ts_probe, .driver = { .name = "MStar-TS", - .pm = &msg2638_pm_ops, + .pm = pm_sleep_ptr(&msg2638_pm_ops), .of_match_table = msg2638_of_match, }, }; From patchwork Mon Jan 2 18:18:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638636 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 059DEC678D5 for ; Mon, 2 Jan 2023 18:07:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236517AbjABSH2 (ORCPT ); Mon, 2 Jan 2023 13:07:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49610 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236559AbjABSHM (ORCPT ); Mon, 2 Jan 2023 13:07:12 -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 BAEB5116B for ; Mon, 2 Jan 2023 10:07:11 -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 70B96B80DF1 for ; Mon, 2 Jan 2023 18:07:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4C043C433F0; Mon, 2 Jan 2023 18:07:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682829; bh=azSq6YF+4EV+1uK5JouKOAdUVIRIYfWtQYtVkDFsx1w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Q7obHyV0gW/W3ksX777MK+MaP0gLXv6pGm/6p0Tbau7FZ15dEZaQfUIgtwk31X1Hh rnmBpwUuezSGNXQTDZ12/9NiUHVWsACdB6z00iPiyDAibz4BE1h5MnM6NEaBsFyDFx Uc/tPRCJIgMR0XmXwg3NbHiihSInZWQDjeHfNw5r2RYzBnIViQ1ngXWi89ggIVXTEg 92Y8PVgl/9By8PtTLfqb+Fpto97jCn7yKmKzjGvPoPKOvUi7Mxe9SwFcy1MXTeOApb qi21vcxSCVM3H3Bytt9QCr140NnqJFlBDjA5HWNAvh5AcD/1DcGQGdnMjc2K9Fe98L +mKkjiT+M69EQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Fabio Estevam Subject: [PATCH 57/69] Input: pixcir_i2c_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:30 +0000 Message-Id: <20230102181842.718010-58-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Fabio Estevam --- drivers/input/touchscreen/pixcir_i2c_ts.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/pixcir_i2c_ts.c b/drivers/input/touchscreen/pixcir_i2c_ts.c index 7959947a3458..f09f4831bad4 100644 --- a/drivers/input/touchscreen/pixcir_i2c_ts.c +++ b/drivers/input/touchscreen/pixcir_i2c_ts.c @@ -405,7 +405,7 @@ static void pixcir_input_close(struct input_dev *dev) pixcir_stop(ts); } -static int __maybe_unused pixcir_i2c_ts_suspend(struct device *dev) +static int pixcir_i2c_ts_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct pixcir_i2c_ts_data *ts = i2c_get_clientdata(client); @@ -432,7 +432,7 @@ static int __maybe_unused pixcir_i2c_ts_suspend(struct device *dev) return ret; } -static int __maybe_unused pixcir_i2c_ts_resume(struct device *dev) +static int pixcir_i2c_ts_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct pixcir_i2c_ts_data *ts = i2c_get_clientdata(client); @@ -459,8 +459,8 @@ static int __maybe_unused pixcir_i2c_ts_resume(struct device *dev) return ret; } -static SIMPLE_DEV_PM_OPS(pixcir_dev_pm_ops, - pixcir_i2c_ts_suspend, pixcir_i2c_ts_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(pixcir_dev_pm_ops, + pixcir_i2c_ts_suspend, pixcir_i2c_ts_resume); static int pixcir_i2c_ts_probe(struct i2c_client *client) { @@ -614,7 +614,7 @@ MODULE_DEVICE_TABLE(of, pixcir_of_match); static struct i2c_driver pixcir_i2c_ts_driver = { .driver = { .name = "pixcir_ts", - .pm = &pixcir_dev_pm_ops, + .pm = pm_sleep_ptr(&pixcir_dev_pm_ops), .of_match_table = of_match_ptr(pixcir_of_match), }, .probe_new = pixcir_i2c_ts_probe, From patchwork Mon Jan 2 18:18:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639126 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 E2A6FC54E76 for ; Mon, 2 Jan 2023 18:07:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236512AbjABSH2 (ORCPT ); Mon, 2 Jan 2023 13:07:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49608 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236558AbjABSHM (ORCPT ); Mon, 2 Jan 2023 13:07:12 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 64451DAD for ; Mon, 2 Jan 2023 10:07:11 -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 F3FE86109A for ; Mon, 2 Jan 2023 18:07:10 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9C4CDC433EF; Mon, 2 Jan 2023 18:07:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682830; bh=p97cadpCAwbN4+eSOmhzOpTVUPpTRTV1Oh+yoMkBD3Y=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=LFV+VTlm1NHljeWq82APSkuBNtwaT0ymPWs5SiMnHevCbVpZWj0QSCrfYX3CxdEzU 2etzM7dA1m88JB4U5p7z8c1M8fuez6iIxs+G1hSHKSnTbINPq8bipa4xmlbB00NaQE gnDda9Y/q0Im++oTwRoaqp594AEbKWYAGC2AkDYU/VH4JefL3EVgQdnm5elOT37K6r ly3LJILyB/lHHMToeUzZCeCxVwfZkzQapSbTEuO7+MI3V+t7zeBcfjHPO6N01/OjI+ kB79DjpGZAnqPlviUIF2f2h5gjz88U19sqLG3Vmfpa1XXmz0c5BTGVq2m7C5twZsAk jHBf+F9ttgGUw== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 58/69] Input: raydium_i2c_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:31 +0000 Message-Id: <20230102181842.718010-59-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/touchscreen/raydium_i2c_ts.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/input/touchscreen/raydium_i2c_ts.c b/drivers/input/touchscreen/raydium_i2c_ts.c index d690a17240c2..49a06d3876cf 100644 --- a/drivers/input/touchscreen/raydium_i2c_ts.c +++ b/drivers/input/touchscreen/raydium_i2c_ts.c @@ -1197,7 +1197,7 @@ static int raydium_i2c_probe(struct i2c_client *client) return 0; } -static void __maybe_unused raydium_enter_sleep(struct i2c_client *client) +static void raydium_enter_sleep(struct i2c_client *client) { static const u8 sleep_cmd[] = { 0x5A, 0xff, 0x00, 0x0f }; int error; @@ -1209,7 +1209,7 @@ static void __maybe_unused raydium_enter_sleep(struct i2c_client *client) "sleep command failed: %d\n", error); } -static int __maybe_unused raydium_i2c_suspend(struct device *dev) +static int raydium_i2c_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct raydium_data *ts = i2c_get_clientdata(client); @@ -1229,7 +1229,7 @@ static int __maybe_unused raydium_i2c_suspend(struct device *dev) return 0; } -static int __maybe_unused raydium_i2c_resume(struct device *dev) +static int raydium_i2c_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct raydium_data *ts = i2c_get_clientdata(client); @@ -1246,8 +1246,8 @@ static int __maybe_unused raydium_i2c_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(raydium_i2c_pm_ops, - raydium_i2c_suspend, raydium_i2c_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(raydium_i2c_pm_ops, + raydium_i2c_suspend, raydium_i2c_resume); static const struct i2c_device_id raydium_i2c_id[] = { { "raydium_i2c", 0 }, @@ -1277,7 +1277,7 @@ static struct i2c_driver raydium_i2c_driver = { .id_table = raydium_i2c_id, .driver = { .name = "raydium_ts", - .pm = &raydium_i2c_pm_ops, + .pm = pm_sleep_ptr(&raydium_i2c_pm_ops), .acpi_match_table = ACPI_PTR(raydium_acpi_id), .of_match_table = of_match_ptr(raydium_of_match), }, From patchwork Mon Jan 2 18:18:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639123 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 BA6FBC53210 for ; Mon, 2 Jan 2023 18:07:30 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236528AbjABSH3 (ORCPT ); Mon, 2 Jan 2023 13:07:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232151AbjABSHP (ORCPT ); Mon, 2 Jan 2023 13:07:15 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 82F4038BD for ; Mon, 2 Jan 2023 10:07: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 14C7FB80DED for ; Mon, 2 Jan 2023 18:07:13 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C58EAC433F0; Mon, 2 Jan 2023 18:07:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682831; bh=ZNJoi6CRGYY42ylwYrS7E+kQ1L3lM7YrqHcIxI5m09Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Vuy2w1mvVSExR4vUvZR9X94Bm0Iqyebr6ZD1R1bhuXKRGLQc7chmXyShr4dK7xOuF q7DBJwZd/n9MvrIoodUXsKb0iLG3pIx/1jLuZKQ2oHIc2cqQP69a8fxPZMMRBAM5s0 uUKUdjY3AElTAg2wwHdulDrnstQkmUuCI51twSyNIuEfo3HkzeCh/lUr0s8Owxk7Fh 4UcAq04qVWnMdKXc2KPKwrXbD7TbcTwyS33BD6xQUwLQPv2PwL8YQRLqApvauErKFS LE7eEekN8hEBv8lzAYmxF8WE7RwSEPZOqiLL6TEFsvN+YwIEYrrFFVpvYfozeAZyga Jcy7GSrYLSToA== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Hans de Goede Subject: [PATCH 59/69] Input: silead - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:32 +0000 Message-Id: <20230102181842.718010-60-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Hans de Goede --- drivers/input/touchscreen/silead.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/silead.c b/drivers/input/touchscreen/silead.c index 8a7351c4414c..a37fac089010 100644 --- a/drivers/input/touchscreen/silead.c +++ b/drivers/input/touchscreen/silead.c @@ -736,7 +736,7 @@ static int silead_ts_probe(struct i2c_client *client) return 0; } -static int __maybe_unused silead_ts_suspend(struct device *dev) +static int silead_ts_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); @@ -745,7 +745,7 @@ static int __maybe_unused silead_ts_suspend(struct device *dev) return 0; } -static int __maybe_unused silead_ts_resume(struct device *dev) +static int silead_ts_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); bool second_try = false; @@ -784,7 +784,7 @@ static int __maybe_unused silead_ts_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(silead_ts_pm, silead_ts_suspend, silead_ts_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(silead_ts_pm, silead_ts_suspend, silead_ts_resume); static const struct i2c_device_id silead_ts_id[] = { { "gsl1680", 0 }, @@ -832,7 +832,7 @@ static struct i2c_driver silead_ts_driver = { .name = SILEAD_TS_NAME, .acpi_match_table = ACPI_PTR(silead_ts_acpi_match), .of_match_table = of_match_ptr(silead_ts_of_match), - .pm = &silead_ts_pm, + .pm = pm_sleep_ptr(&silead_ts_pm), }, }; module_i2c_driver(silead_ts_driver); From patchwork Mon Jan 2 18:18:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639120 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 3F746C4708D for ; Mon, 2 Jan 2023 18:07:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232151AbjABSHa (ORCPT ); Mon, 2 Jan 2023 13:07:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236298AbjABSHQ (ORCPT ); Mon, 2 Jan 2023 13:07:16 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B8E495F96 for ; Mon, 2 Jan 2023 10:07:15 -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 6985BB80DF0 for ; Mon, 2 Jan 2023 18:07:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2341FC433D2; Mon, 2 Jan 2023 18:07:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682833; bh=pOtQFRFZ1Jm3XVuE8vq2Jxymty7rjqd8mlv/ZM2z+XM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=I1e/G7wW1SrKMVNEdCMIMvF3viToD3anMAafpbyB3prQeHD0FF7dFGMvDlhMSPu5K n3WOD6fAMHLCaTVPPXLkHAdJROFXjduELd56PK5aKgo/st4BdECyf3P80lZCf5hdJH SfHyIF7rHnRqB2dWulF3cd5YLSOP0niKUKE1H5q9xlrb+Gzaj0iBFhqq6I/cuBiBWn eS6yLzX3pTvXgxQcUpKF3g4QemDDkb0I2YoQBtOCQoedmc6+7VakT6yX/ugh/tvlBc tsied90hwwc0VnbXz1TCYA5lrPzIlwMB/k7WCkg3Jqie0egYNYCXw/U1o8A2wQeUwa LhsJtYgy4Za7g== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , John Keeping Subject: [PATCH 60/69] Input: st1232 - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:33 +0000 Message-Id: <20230102181842.718010-61-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: John Keeping --- drivers/input/touchscreen/st1232.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/st1232.c b/drivers/input/touchscreen/st1232.c index bd68633dc6c0..f49566dc96f8 100644 --- a/drivers/input/touchscreen/st1232.c +++ b/drivers/input/touchscreen/st1232.c @@ -340,7 +340,7 @@ static int st1232_ts_probe(struct i2c_client *client) return 0; } -static int __maybe_unused st1232_ts_suspend(struct device *dev) +static int st1232_ts_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct st1232_ts_data *ts = i2c_get_clientdata(client); @@ -353,7 +353,7 @@ static int __maybe_unused st1232_ts_suspend(struct device *dev) return 0; } -static int __maybe_unused st1232_ts_resume(struct device *dev) +static int st1232_ts_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct st1232_ts_data *ts = i2c_get_clientdata(client); @@ -366,8 +366,8 @@ static int __maybe_unused st1232_ts_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(st1232_ts_pm_ops, - st1232_ts_suspend, st1232_ts_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(st1232_ts_pm_ops, + st1232_ts_suspend, st1232_ts_resume); static const struct i2c_device_id st1232_ts_id[] = { { ST1232_TS_NAME, (unsigned long)&st1232_chip_info }, @@ -390,7 +390,7 @@ static struct i2c_driver st1232_ts_driver = { .name = ST1232_TS_NAME, .of_match_table = st1232_ts_dt_ids, .probe_type = PROBE_PREFER_ASYNCHRONOUS, - .pm = &st1232_ts_pm_ops, + .pm = pm_sleep_ptr(&st1232_ts_pm_ops), }, }; From patchwork Mon Jan 2 18:18:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638631 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 EBDE0C4708E for ; Mon, 2 Jan 2023 18:07:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236313AbjABSHb (ORCPT ); Mon, 2 Jan 2023 13:07:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236329AbjABSHR (ORCPT ); Mon, 2 Jan 2023 13:07:17 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 39EA32F5 for ; Mon, 2 Jan 2023 10:07: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 DF2A9B80DF5 for ; Mon, 2 Jan 2023 18:07:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77303C433F0; Mon, 2 Jan 2023 18:07:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682834; bh=dAlfi3RLLV0942y0dlxDhozOmjKNK0RGjvUZcn1Uj8g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NLICCP1Rg5GcxJxKzCLk/phcnwVjrYvyV6GvelsbW/InmTW5ddWnPXiS5afIYlF7j Ic5MQUHmjRU99YzJNHaTdmjo9UQDVN4xBMcwxwpkvu+EnteH1SbpIJJlxGSE/4X3bA 66YDOHKAmxStWKDH6jATJ3vwYkO/XiGlRgVAhxH/yOe7jzjzvTdh3y2Otrn0PbKFUe spV/cgHc88WNGfU1A7WObx0oKhn8Os2BjfHiKQMGmst9yAMbn+0GigXu7Hyz5gK50J lnNGmUsL/20vEImt7ccuWutUAXrn4CTZt9RiTk2nkFoIS/HPFlL1opylTYtOpuvKe5 itl9BEE9llfHg== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Stephen Just , Benjamin Tissoires Subject: [PATCH 61/69] Input: surface3_spi - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:34 +0000 Message-Id: <20230102181842.718010-62-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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 Just Cc: Benjamin Tissoires --- drivers/input/touchscreen/surface3_spi.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/input/touchscreen/surface3_spi.c b/drivers/input/touchscreen/surface3_spi.c index 1da23e5585a0..31d140248f2e 100644 --- a/drivers/input/touchscreen/surface3_spi.c +++ b/drivers/input/touchscreen/surface3_spi.c @@ -369,7 +369,7 @@ static int surface3_spi_probe(struct spi_device *spi) return 0; } -static int __maybe_unused surface3_spi_suspend(struct device *dev) +static int surface3_spi_suspend(struct device *dev) { struct spi_device *spi = to_spi_device(dev); struct surface3_ts_data *data = spi_get_drvdata(spi); @@ -381,7 +381,7 @@ static int __maybe_unused surface3_spi_suspend(struct device *dev) return 0; } -static int __maybe_unused surface3_spi_resume(struct device *dev) +static int surface3_spi_resume(struct device *dev) { struct spi_device *spi = to_spi_device(dev); struct surface3_ts_data *data = spi_get_drvdata(spi); @@ -393,9 +393,9 @@ static int __maybe_unused surface3_spi_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(surface3_spi_pm_ops, - surface3_spi_suspend, - surface3_spi_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(surface3_spi_pm_ops, + surface3_spi_suspend, + surface3_spi_resume); #ifdef CONFIG_ACPI static const struct acpi_device_id surface3_spi_acpi_match[] = { @@ -409,7 +409,7 @@ static struct spi_driver surface3_spi_driver = { .driver = { .name = "Surface3-spi", .acpi_match_table = ACPI_PTR(surface3_spi_acpi_match), - .pm = &surface3_spi_pm_ops, + .pm = pm_sleep_ptr(&surface3_spi_pm_ops), }, .probe = surface3_spi_probe, }; From patchwork Mon Jan 2 18:18:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639121 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 D694BC54EBC for ; Mon, 2 Jan 2023 18:07:32 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236298AbjABSHa (ORCPT ); Mon, 2 Jan 2023 13:07:30 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236313AbjABSHR (ORCPT ); Mon, 2 Jan 2023 13:07:17 -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 DBF3D5F96 for ; Mon, 2 Jan 2023 10:07: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 776BB61084 for ; Mon, 2 Jan 2023 18:07:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F03EDC433EF; Mon, 2 Jan 2023 18:07:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682835; bh=48Vj5p6AnR2rJaq9SOgxMVfQh0dhal3ebs2RixzwhmY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=uuoazqvTfckPAxvYnI2hWBfSMD9MBhzzlbLqQ4G/TffjOcbgi17OaZeBC2TAehzK/ ik4gw1+0aouwUfPNDBw4KZmnWb+4IuoJ5AsSoYyPDyH28ZZUdZlfWRF89P23h3OzBe qsOGglx6BPs1kz0hVPh85un9pHn2xlrF6+oBTWjK2xUxj0KysOzgvJbR5O52ryIJpR Qv5oaFXvS0pKMWRiTC5MHWsTtVHExgCqz8yC6F2IUJ2UppEUI/50+tA4V8di18pd0S 0Jcybz81XnOcVsZP+mZqHyGlUy9xNZjJFbEyVfTu2R2u9LtFsGDFxLdsnjYHNRo1FO 04bdqWqZ9+25A== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Dario Binacchi Subject: [PATCH 62/69] Input: ti_am335x_tsc - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:35 +0000 Message-Id: <20230102181842.718010-63-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Dario Binacchi --- drivers/input/touchscreen/ti_am335x_tsc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/ti_am335x_tsc.c b/drivers/input/touchscreen/ti_am335x_tsc.c index f2fb6a9a1a57..decf2d24a115 100644 --- a/drivers/input/touchscreen/ti_am335x_tsc.c +++ b/drivers/input/touchscreen/ti_am335x_tsc.c @@ -512,7 +512,7 @@ static int titsc_remove(struct platform_device *pdev) return 0; } -static int __maybe_unused titsc_suspend(struct device *dev) +static int titsc_suspend(struct device *dev) { struct titsc *ts_dev = dev_get_drvdata(dev); unsigned int idle; @@ -527,7 +527,7 @@ static int __maybe_unused titsc_suspend(struct device *dev) return 0; } -static int __maybe_unused titsc_resume(struct device *dev) +static int titsc_resume(struct device *dev) { struct titsc *ts_dev = dev_get_drvdata(dev); @@ -543,7 +543,7 @@ static int __maybe_unused titsc_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(titsc_pm_ops, titsc_suspend, titsc_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(titsc_pm_ops, titsc_suspend, titsc_resume); static const struct of_device_id ti_tsc_dt_ids[] = { { .compatible = "ti,am3359-tsc", }, @@ -556,7 +556,7 @@ static struct platform_driver ti_tsc_driver = { .remove = titsc_remove, .driver = { .name = "TI-am335x-tsc", - .pm = &titsc_pm_ops, + .pm = pm_sleep_ptr(&titsc_pm_ops), .of_match_table = ti_tsc_dt_ids, }, }; From patchwork Mon Jan 2 18:18:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639119 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 2E19BC54EBE for ; Mon, 2 Jan 2023 18:07:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236388AbjABSHd (ORCPT ); Mon, 2 Jan 2023 13:07:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236451AbjABSHU (ORCPT ); Mon, 2 Jan 2023 13:07:20 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9A87855BB for ; Mon, 2 Jan 2023 10:07: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 ams.source.kernel.org (Postfix) with ESMTPS id 48DE4B80DF0 for ; Mon, 2 Jan 2023 18:07:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4CF59C433D2; Mon, 2 Jan 2023 18:07:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682837; bh=Y1Csk/jAlhoN8DqbAw4sHvp8m2skPk4TUsUXQnDQQk8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NJAFFQCkOEQGrYnCVk3OOcOnJU77xEZZIz+NzPNq87XVFaqD2xsCt3AYoREdsh/vi QL6NxRDXnU+AsK331qgduj/L0MqOqRSOvykImKF9Ne5Drp/2YAGGVbbL9UXTJ8ECzb laMM5I6MDuvNOA/i26gKNkB9YprOJ2ZU6CXBo/7Vch2qMluLLOCqX+VLOZ/NbllW+k PI5Is+zZTFKWu6Lni4KFhYzypskpsDEaot0XkagO6sg/luVD9AuC4MQEghvreX2x8N TVxnJkIOAT6DXjccXXW7GNzd4jSY+X0kpFTCnoIE0yWep/XLdes2qY9MDIGgIId0wE 9IWZD6IjftBeA== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 63/69] Input: ucb1400_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:36 +0000 Message-Id: <20230102181842.718010-64-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/touchscreen/ucb1400_ts.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/ucb1400_ts.c b/drivers/input/touchscreen/ucb1400_ts.c index dfd3b35590c3..1b3d1df231bb 100644 --- a/drivers/input/touchscreen/ucb1400_ts.c +++ b/drivers/input/touchscreen/ucb1400_ts.c @@ -401,7 +401,7 @@ static int ucb1400_ts_remove(struct platform_device *pdev) return 0; } -static int __maybe_unused ucb1400_ts_suspend(struct device *dev) +static int ucb1400_ts_suspend(struct device *dev) { struct ucb1400_ts *ucb = dev_get_platdata(dev); struct input_dev *idev = ucb->ts_idev; @@ -415,7 +415,7 @@ static int __maybe_unused ucb1400_ts_suspend(struct device *dev) return 0; } -static int __maybe_unused ucb1400_ts_resume(struct device *dev) +static int ucb1400_ts_resume(struct device *dev) { struct ucb1400_ts *ucb = dev_get_platdata(dev); struct input_dev *idev = ucb->ts_idev; @@ -429,15 +429,15 @@ static int __maybe_unused ucb1400_ts_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(ucb1400_ts_pm_ops, - ucb1400_ts_suspend, ucb1400_ts_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(ucb1400_ts_pm_ops, + ucb1400_ts_suspend, ucb1400_ts_resume); static struct platform_driver ucb1400_ts_driver = { .probe = ucb1400_ts_probe, .remove = ucb1400_ts_remove, .driver = { .name = "ucb1400_ts", - .pm = &ucb1400_ts_pm_ops, + .pm = pm_sleep_ptr(&ucb1400_ts_pm_ops), }, }; module_platform_driver(ucb1400_ts_driver); From patchwork Mon Jan 2 18:18:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638630 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 950AFC54EF0 for ; Mon, 2 Jan 2023 18:07:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236329AbjABSHb (ORCPT ); Mon, 2 Jan 2023 13:07:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49678 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236388AbjABSHT (ORCPT ); Mon, 2 Jan 2023 13:07:19 -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 6189B38BD for ; Mon, 2 Jan 2023 10:07: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 F2F9D61084 for ; Mon, 2 Jan 2023 18:07:18 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 77444C433EF; Mon, 2 Jan 2023 18:07:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682838; bh=ZxdRays0U7aO4JHI2VFh9dHUrLZ768y6jSLQmU6jWtA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dEoo2mVNyUmOjnKXL5wam1VukUsvmoUjUlc2i9R3MeDTug6Xl0kE5tVMIdGa9bwWl xaCz1pzEKvLJgiMtOxVLmI/2Jqld2DcLWuFWTNUV/532bAzZK1fnPoUP4kB59ULfDz /R3T7tgmX3dTaaaCySBdA1cnwSsn1VszY8AMUeloFJo8sAyvUfLsMJbDqVhWP5e6a0 U8WED45hFSnnuWtKnhpTIcjL1IZNfh2SspBzmyZG8jPskM19PHAN2ep80jVsJjgkin coaSof51lZbsfqz5dJNa7YUumOKTIQZ6+EUUArvAWlF3UdxJURzjVkQ4vDmX3fRuop Ln1RpxAZJY+6A== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Alistair Francis Subject: [PATCH 64/69] Input: wacom_i2c - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:37 +0000 Message-Id: <20230102181842.718010-65-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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: Alistair Francis Reviewed-by: Alistair Francis --- drivers/input/touchscreen/wacom_i2c.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/wacom_i2c.c b/drivers/input/touchscreen/wacom_i2c.c index c9188ee00c62..a145b9105255 100644 --- a/drivers/input/touchscreen/wacom_i2c.c +++ b/drivers/input/touchscreen/wacom_i2c.c @@ -232,7 +232,7 @@ static int wacom_i2c_probe(struct i2c_client *client) return 0; } -static int __maybe_unused wacom_i2c_suspend(struct device *dev) +static int wacom_i2c_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); @@ -241,7 +241,7 @@ static int __maybe_unused wacom_i2c_suspend(struct device *dev) return 0; } -static int __maybe_unused wacom_i2c_resume(struct device *dev) +static int wacom_i2c_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); @@ -250,7 +250,7 @@ static int __maybe_unused wacom_i2c_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(wacom_i2c_pm, wacom_i2c_suspend, wacom_i2c_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(wacom_i2c_pm, wacom_i2c_suspend, wacom_i2c_resume); static const struct i2c_device_id wacom_i2c_id[] = { { "WAC_I2C_EMR", 0 }, @@ -261,7 +261,7 @@ MODULE_DEVICE_TABLE(i2c, wacom_i2c_id); static struct i2c_driver wacom_i2c_driver = { .driver = { .name = "wacom_i2c", - .pm = &wacom_i2c_pm, + .pm = pm_sleep_ptr(&wacom_i2c_pm), }, .probe_new = wacom_i2c_probe, From patchwork Mon Jan 2 18:18:38 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638629 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 D019DC54EF1 for ; Mon, 2 Jan 2023 18:07:34 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236451AbjABSHd (ORCPT ); Mon, 2 Jan 2023 13:07:33 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49702 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236452AbjABSHV (ORCPT ); Mon, 2 Jan 2023 13:07:21 -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 88D082E2 for ; Mon, 2 Jan 2023 10:07:20 -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 26DD861038 for ; Mon, 2 Jan 2023 18:07:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C88A3C433F0; Mon, 2 Jan 2023 18:07:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682839; bh=SDsLxYAM5d+mRT4vUHww8LmYxVPiSxLKAcMZQ6Dby+w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qZQFH4dCtuKg4AxfTFwj7lLbxyFR+VEkGHakL/ogkAgouciMwos7dtb4jt0UdEMBv HOqelKFfksRuLf3+2LDTrXKZ9iDA5qMoXNtk1jQ3v9gAbNvu+8cdO5G7h153V6SH4+ DICApkxPvnGNCu7Ky4tKj1VUYT8GiDLHwXTY3hOKstxjKldYsXP3AvwilFdKzma/YQ Lj3PBB04pC4zclj0dN5UhbkdYR8JbvmvAkDs9GkTN6rZiy6t+Tg8Jb/vRdoYB/vnW2 cIFmzykBiiNVPBtE3AuiqaFlapNn3sD/EayW2Co8auedQp+IpbY9Sqle4ZfAH/od6e 00umn9+EgCJdw== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 65/69] Input: wdt87xx_i2c - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:38 +0000 Message-Id: <20230102181842.718010-66-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/touchscreen/wdt87xx_i2c.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/wdt87xx_i2c.c b/drivers/input/touchscreen/wdt87xx_i2c.c index 3f87db5cdca4..771962af3d0a 100644 --- a/drivers/input/touchscreen/wdt87xx_i2c.c +++ b/drivers/input/touchscreen/wdt87xx_i2c.c @@ -1113,7 +1113,7 @@ static int wdt87xx_ts_probe(struct i2c_client *client) return 0; } -static int __maybe_unused wdt87xx_suspend(struct device *dev) +static int wdt87xx_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); int error; @@ -1132,7 +1132,7 @@ static int __maybe_unused wdt87xx_suspend(struct device *dev) return 0; } -static int __maybe_unused wdt87xx_resume(struct device *dev) +static int wdt87xx_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); int error; @@ -1154,7 +1154,7 @@ static int __maybe_unused wdt87xx_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(wdt87xx_pm_ops, wdt87xx_suspend, wdt87xx_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(wdt87xx_pm_ops, wdt87xx_suspend, wdt87xx_resume); static const struct i2c_device_id wdt87xx_dev_id[] = { { WDT87XX_NAME, 0 }, @@ -1173,7 +1173,7 @@ static struct i2c_driver wdt87xx_driver = { .id_table = wdt87xx_dev_id, .driver = { .name = WDT87XX_NAME, - .pm = &wdt87xx_pm_ops, + .pm = pm_sleep_ptr(&wdt87xx_pm_ops), .acpi_match_table = ACPI_PTR(wdt87xx_acpi_id), }, }; From patchwork Mon Jan 2 18:18:39 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639118 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 60799C53210 for ; Mon, 2 Jan 2023 18:07:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236530AbjABSHe (ORCPT ); Mon, 2 Jan 2023 13:07:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236475AbjABSHY (ORCPT ); Mon, 2 Jan 2023 13:07:24 -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 55977625E for ; Mon, 2 Jan 2023 10:07:23 -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 06CCEB80DF0 for ; Mon, 2 Jan 2023 18:07:22 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id F3B06C433EF; Mon, 2 Jan 2023 18:07:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682840; bh=oWaP/dpAbIyR5ftaPWRn+r0glgsacUFqwB+Ehr/0slA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=rhbmDm2yFKP42bCYhYcMl6ovFVnc0qyAMnJnigqyHgqaDWS/eyqiCFtAoBgxteFhq zRQKAgiVLN0lsUU8RTwBQCLkNC7dMD8OaTvG5GPqAOhrF7J9uZOQuo6oLgCizGG+Ue /6knM1QNa9B2RXlxX3tMDDKnphttAKzmS3se9NSLQ54MCIfyhwHsGKLTKQP5xNRWS3 5XcoZtsEapJGDCvuoCMUSUzBSqSHU8VEMIRQ8tvlQliVI3dMl/ZY8pHvT0oF8ocQhL h44gTnauW6wX8hAVqB9HKsv0+ij55zaxMHot4bwIpsRvjOCjjiiywAy1LninEjefMU n1npoZsZyMXkg== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 66/69] Input: wm97xx - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:39 +0000 Message-Id: <20230102181842.718010-67-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/touchscreen/wm97xx-core.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c index f51ab5614532..ac3b3dd59488 100644 --- a/drivers/input/touchscreen/wm97xx-core.c +++ b/drivers/input/touchscreen/wm97xx-core.c @@ -763,7 +763,7 @@ static int wm97xx_mfd_remove(struct platform_device *pdev) return 0; } -static int __maybe_unused wm97xx_suspend(struct device *dev) +static int wm97xx_suspend(struct device *dev) { struct wm97xx *wm = dev_get_drvdata(dev); u16 reg; @@ -797,7 +797,7 @@ static int __maybe_unused wm97xx_suspend(struct device *dev) return 0; } -static int __maybe_unused wm97xx_resume(struct device *dev) +static int wm97xx_resume(struct device *dev) { struct wm97xx *wm = dev_get_drvdata(dev); @@ -833,7 +833,7 @@ static int __maybe_unused wm97xx_resume(struct device *dev) return 0; } -static SIMPLE_DEV_PM_OPS(wm97xx_pm_ops, wm97xx_suspend, wm97xx_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(wm97xx_pm_ops, wm97xx_suspend, wm97xx_resume); /* * Machine specific operations @@ -869,13 +869,13 @@ static struct device_driver wm97xx_driver = { .owner = THIS_MODULE, .probe = wm97xx_probe, .remove = wm97xx_remove, - .pm = &wm97xx_pm_ops, + .pm = pm_sleep_ptr(&wm97xx_pm_ops), }; static struct platform_driver wm97xx_mfd_driver = { .driver = { .name = "wm97xx-ts", - .pm = &wm97xx_pm_ops, + .pm = pm_sleep_ptr(&wm97xx_pm_ops), }, .probe = wm97xx_mfd_probe, .remove = wm97xx_mfd_remove, From patchwork Mon Jan 2 18:18:40 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638628 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 E7BC8C4708D for ; Mon, 2 Jan 2023 18:07:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236452AbjABSHf (ORCPT ); Mon, 2 Jan 2023 13:07:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49752 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236496AbjABSHZ (ORCPT ); Mon, 2 Jan 2023 13:07:25 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A10F9DB1 for ; Mon, 2 Jan 2023 10:07: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 496A9B80DF4 for ; Mon, 2 Jan 2023 18:07:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2D02AC433F0; Mon, 2 Jan 2023 18:07:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682841; bh=D+xzrm8+tGJWej4XFfR/tu4Ix5fet+t3h85ezQCOn3g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=fOvqJyL9GCaiXFyW+lgySGPalm6qwowQgnB5HLxF5REoW1ktRYIV7bCb+m8niLcsY sg1PkXaRkSMB+PDQS4O4LQwKb483Tt8gCNMwmNobEaWSrKZZoH7AvxoqVx1l0MMa+C /j7ODlavDeVtOqBtcJM56nAP/hwhBSv+vEbCgS7AkY8zLzV7SVR5M4XT4uw8Kkfvf+ IUJUUKXMfnWClGE6tUi/jV89mIPJFq/FjTQXs3EmlRGNCnK0GtEcHcbAGwhzwNNn8m C4KdnaS9xlayKnQqzfxDhTZmc0ZMIHdJAPVz0DVXYLrMnkvBGUikI38nlMPX5INLvK i7tA6EwI0Fidg== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron Subject: [PATCH 67/69] Input: zforce_ts - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:40 +0000 Message-Id: <20230102181842.718010-68-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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/touchscreen/zforce_ts.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/zforce_ts.c b/drivers/input/touchscreen/zforce_ts.c index 24e78ca83fa3..76b194285e1c 100644 --- a/drivers/input/touchscreen/zforce_ts.c +++ b/drivers/input/touchscreen/zforce_ts.c @@ -608,7 +608,7 @@ static void zforce_input_close(struct input_dev *dev) return; } -static int __maybe_unused zforce_suspend(struct device *dev) +static int zforce_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct zforce_ts *ts = i2c_get_clientdata(client); @@ -653,7 +653,7 @@ static int __maybe_unused zforce_suspend(struct device *dev) return ret; } -static int __maybe_unused zforce_resume(struct device *dev) +static int zforce_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct zforce_ts *ts = i2c_get_clientdata(client); @@ -691,7 +691,7 @@ static int __maybe_unused zforce_resume(struct device *dev) return ret; } -static SIMPLE_DEV_PM_OPS(zforce_pm_ops, zforce_suspend, zforce_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(zforce_pm_ops, zforce_suspend, zforce_resume); static void zforce_reset(void *data) { @@ -941,7 +941,7 @@ MODULE_DEVICE_TABLE(of, zforce_dt_idtable); static struct i2c_driver zforce_driver = { .driver = { .name = "zforce-ts", - .pm = &zforce_pm_ops, + .pm = pm_sleep_ptr(&zforce_pm_ops), .of_match_table = of_match_ptr(zforce_dt_idtable), }, .probe_new = zforce_probe, From patchwork Mon Jan 2 18:18:41 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 638627 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 02AD9C3DA7A for ; Mon, 2 Jan 2023 18:07:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236495AbjABSHg (ORCPT ); Mon, 2 Jan 2023 13:07:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49770 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236500AbjABSH1 (ORCPT ); Mon, 2 Jan 2023 13:07:27 -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 E534D116B for ; Mon, 2 Jan 2023 10:07: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 936E2B80DF0 for ; Mon, 2 Jan 2023 18:07:24 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 56C94C433D2; Mon, 2 Jan 2023 18:07:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682843; bh=gkIYc4/MRL5X3akPURcJs/EjJw83xE9ZMq4yKDMqTPg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Isl1q/7xp6XftcdnUCDMeA9QhMHg6VrNClJWtWGYtWeZY77gRCPj397HiqKFIV4iJ LMyfQH3dJzQTNvb6e0klQJ8Cz4g9wHK5mUSDyo8L03ZGJlK/DaNzS1zNurF1CMgB0L gga6Vw5WRqRkp/wT7XJcDLL9ArWeXqo7LbyX3B2V9FUrtxs4c7vua4IdMNSz+W59Qd GxgVWwrAgskesuQZcoEaFfXF2ufCRDO6iiKOTyD8NHIPLGZg//x9sBhB8/KCGxG+3b 4p01WCgUXExF8I3pT5xuNVGYkWxtqfhEnbFxkhfbJgNohoXL4qNjak02TYvN0uq/2C pFV5OVSbx4taQ== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Linus Walleij Subject: [PATCH 68/69] Input: zinitix - switch to DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:41 +0000 Message-Id: <20230102181842.718010-69-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-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 --- drivers/input/touchscreen/zinitix.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/input/touchscreen/zinitix.c b/drivers/input/touchscreen/zinitix.c index 52f9e9eaab14..cdf9bcd744db 100644 --- a/drivers/input/touchscreen/zinitix.c +++ b/drivers/input/touchscreen/zinitix.c @@ -562,7 +562,7 @@ static int zinitix_ts_probe(struct i2c_client *client) return 0; } -static int __maybe_unused zinitix_suspend(struct device *dev) +static int zinitix_suspend(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct bt541_ts_data *bt541 = i2c_get_clientdata(client); @@ -577,7 +577,7 @@ static int __maybe_unused zinitix_suspend(struct device *dev) return 0; } -static int __maybe_unused zinitix_resume(struct device *dev) +static int zinitix_resume(struct device *dev) { struct i2c_client *client = to_i2c_client(dev); struct bt541_ts_data *bt541 = i2c_get_clientdata(client); @@ -593,7 +593,7 @@ static int __maybe_unused zinitix_resume(struct device *dev) return ret; } -static SIMPLE_DEV_PM_OPS(zinitix_pm_ops, zinitix_suspend, zinitix_resume); +static DEFINE_SIMPLE_DEV_PM_OPS(zinitix_pm_ops, zinitix_suspend, zinitix_resume); #ifdef CONFIG_OF static const struct of_device_id zinitix_of_match[] = { @@ -620,7 +620,7 @@ static struct i2c_driver zinitix_ts_driver = { .probe_new = zinitix_ts_probe, .driver = { .name = "Zinitix-TS", - .pm = &zinitix_pm_ops, + .pm = pm_sleep_ptr(&zinitix_pm_ops), .of_match_table = of_match_ptr(zinitix_of_match), }, }; From patchwork Mon Jan 2 18:18:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 639117 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 8764BC4708E for ; Mon, 2 Jan 2023 18:07:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236475AbjABSHf (ORCPT ); Mon, 2 Jan 2023 13:07:35 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236495AbjABSH1 (ORCPT ); Mon, 2 Jan 2023 13:07:27 -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 939EA2F5 for ; Mon, 2 Jan 2023 10:07: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 dfw.source.kernel.org (Postfix) with ESMTPS id 32CCE61038 for ; Mon, 2 Jan 2023 18:07:25 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A952DC433EF; Mon, 2 Jan 2023 18:07:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1672682844; bh=fKlwZBB5vriG9IeekEsuZH7scn4rXfepY25G/m2u79g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Kc1gCAxmg8xRe1RwTqrLp7CjVLDreLAJs5Z2ILwlrxNiqKvzI5rJ5OA3VZQXwsq9+ nz02aLEn3ejSY4XkmCcnw4jvjHj87vxmtzRKLh8sEyvAPiH3PoJiEOtL80w6sP2caL l7EvQX5xQubLZVv39BAZ21vOOgMhV4UsoICpOM6du2GoiIVNMiQoG78twFww2QhjZ7 u3/TnWgSGFRUhOq+KqCe3vrzScn3ryjMjzwE9ghiy97cPxUINTj36P822n6rbqysuE fSovdJodRAeTxxbSZRtj/fl3cVaL2+XFBGyt13785TxHxxviC/h1Nb2JNYE3eVqXL/ X4Wjdu2D2H5qw== From: Jonathan Cameron To: linux-input@vger.kernel.org, Dmitry Torokhov Cc: Jonathan Cameron , Linus Walleij Subject: [PATCH 69/69] Input: ipaq-micro-ts - use DEFINE_SIMPLE_DEV_PM_OPS() and pm_sleep_ptr() Date: Mon, 2 Jan 2023 18:18:42 +0000 Message-Id: <20230102181842.718010-70-jic23@kernel.org> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230102181842.718010-1-jic23@kernel.org> References: <20230102181842.718010-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-input@vger.kernel.org From: Jonathan Cameron This driver never used the older SIMPLE_DEV_PM_OPS() but instead just set two of the callbacks directly. Skip that deprecated macro and go straight to the new form that avoids the need for guarding or marking callbacks __maybe_unused. Signed-off-by: Jonathan Cameron Cc: Linus Walleij --- It is possible there is some subtle reason why only two of the callbacks normally set by SIMPLE_DEV_PM_OPS() are set. As such, this one needs some closer reading than many of the others. --- drivers/input/touchscreen/ipaq-micro-ts.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/drivers/input/touchscreen/ipaq-micro-ts.c b/drivers/input/touchscreen/ipaq-micro-ts.c index 0eb5689fe65f..d8e25b502968 100644 --- a/drivers/input/touchscreen/ipaq-micro-ts.c +++ b/drivers/input/touchscreen/ipaq-micro-ts.c @@ -119,7 +119,7 @@ static int micro_ts_probe(struct platform_device *pdev) return 0; } -static int __maybe_unused micro_ts_suspend(struct device *dev) +static int micro_ts_suspend(struct device *dev) { struct touchscreen_data *ts = dev_get_drvdata(dev); @@ -128,7 +128,7 @@ static int __maybe_unused micro_ts_suspend(struct device *dev) return 0; } -static int __maybe_unused micro_ts_resume(struct device *dev) +static int micro_ts_resume(struct device *dev) { struct touchscreen_data *ts = dev_get_drvdata(dev); struct input_dev *input = ts->input; @@ -143,14 +143,13 @@ static int __maybe_unused micro_ts_resume(struct device *dev) return 0; } -static const struct dev_pm_ops micro_ts_dev_pm_ops = { - SET_SYSTEM_SLEEP_PM_OPS(micro_ts_suspend, micro_ts_resume) -}; +static DEFINE_SIMPLE_DEV_PM(micro_ts_dev_pm_ops, + micro_ts_suspend, micro_ts_resume); static struct platform_driver micro_ts_device_driver = { .driver = { .name = "ipaq-micro-ts", - .pm = µ_ts_dev_pm_ops, + .pm = pm_sleep_ptr(µ_ts_dev_pm_ops), }, .probe = micro_ts_probe, };