Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp3130823rdb; Sat, 9 Dec 2023 12:40:45 -0800 (PST) X-Google-Smtp-Source: AGHT+IHC89qrORfFhXxvUsRZbHPl7/7l4OdrGF+WcrnJSTvYdp/q8uQueavz0Ue0mQipNc/zj0He X-Received: by 2002:a17:902:d490:b0:1d1:d30a:17ba with SMTP id c16-20020a170902d49000b001d1d30a17bamr2770386plg.36.1702154445541; Sat, 09 Dec 2023 12:40:45 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702154445; cv=none; d=google.com; s=arc-20160816; b=zImuiQi/YWg5zupXUK+wdr1D8n/ymnyBkRWPBwLDrIx2A1hjuwaAe+IOFrXtv0yVQG CEmL4k6Ng1bapp94pnIk5agL2ypIIHVgH9h5zMG3Ua2iPyVMvxzbH+lFmQ2az6YT+Ns0 wwB7Op5bxat1yDltQzFSScD1LuNDe0w3Vs2EB0FkVtkorOG+4r2C4V22Hx5jrZSOO+Xh TfaDSVB1zqEMofdACZw3IJQbG6oYL/FtUz4el19asVA0L9b3IESiFr8Oh77cJuZjyNVo ymYQDnft66NWRg6OJqrprhw0YTHyqS4ZzBgGFuEig1btOlVhSZj8KRWWQWB3PbJjYiwE WXBA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=EabGGbWRaKtiZlxJ7KRZSmnTeXn4rSmnQC6nT/CdZIQ=; fh=dgKPqND1yeOHgkZYdqBEc/bnLAqKRm9rpHM8U4GA+Yk=; b=uhTMDk4vYMq2YdkVAz+KsXM5e/QsJiMjQyMSpZT5vOXG7VFc7MOoGyusO/knoM05Bs UMo80bXtuawC67VXkkAXN+ayimRZoGJMnnbKHUjlaB8wiENowfkMU4+xvjiFSurgxyaa pMBiPBBZlq/AvhzQRbCuylDfp48gedN2CMscAQSFfKwpURfWJN4G52Ph0y1SM+7ec9pE 4G5YIxHL2XlswU5SmVs0UqbfkyG8zLAzJLIWgmr24j2c2Sd1PaEGDq/ahlEUOWfBjB9w 2pDxdBGTBa7fP8k8qHI63tcMBZK3EHsqg9xLd3f7+T+8yZ5T9vblDwK8pcM3e6GMyB0C hotg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=PmfACO10; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Return-Path: Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id jh5-20020a170903328500b001d04d395a5dsi3509126plb.484.2023.12.09.12.40.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 12:40:45 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=PmfACO10; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=collabora.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 0BE63805F963; Sat, 9 Dec 2023 12:40:44 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229501AbjLIUkc (ORCPT + 99 others); Sat, 9 Dec 2023 15:40:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55794 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229518AbjLIUk0 (ORCPT ); Sat, 9 Dec 2023 15:40:26 -0500 Received: from madrid.collaboradmins.com (madrid.collaboradmins.com [46.235.227.194]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D834213A; Sat, 9 Dec 2023 12:40:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1702153981; bh=3an5VNl71NRgnt3gpyTrGYWNJfJ93WLbctgGf4WYCz0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PmfACO109Y5TY6iCrr1Oa8UfTCGGEqwV8cQ+ljhQU58GlJffxvQQuI5xeSZ9hANUm onEzuuNsDY+fp4PcEW2mtRXy2q4ySg1qXmnNASZlfraVH3KYdsj+jiKTaX9nt744Ik 9PhiIT4a6RAJYuUFhx8R9gA9JASWXTpOD5mcm+Urq32L+4+hr+D+XXOfIgototSLYK RL8SrGnYiRpfBMo+4CsxwkRWkAhIxPUnw1etJncWgv6eLI50e/PXmJdjMDOejEzUff CqvBccn4qyfMwivdANMAMFO2sIRPZCF8tijZ+NrYYNeOhYYvnecLKQgm6aiML5umys 7NJijbbMsKccw== Received: from localhost (cola.collaboradmins.com [195.201.22.229]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) (Authenticated sender: cristicc) by madrid.collaboradmins.com (Postfix) with ESMTPSA id 5381937813DD; Sat, 9 Dec 2023 20:33:01 +0000 (UTC) From: Cristian Ciocaltea To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Venkata Prasad Potturu , Marian Postevca , Vijendar Mukunda , Syed Saba Kareem , Alper Nebi Yasak , Kuninori Morimoto , Rander Wang , Pierre-Louis Bossart , Daniel Baluta , Ajit Kumar Pandey , Bard Liao , Kai Vehmanen Cc: linux-sound@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@collabora.com Subject: [PATCH 3/5] ASoC: amd: vangogh: Switch to {RUNTIME,SYSTEM_SLEEP}_PM_OPS Date: Sat, 9 Dec 2023 22:32:21 +0200 Message-ID: <20231209203229.878730-4-cristian.ciocaltea@collabora.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20231209203229.878730-1-cristian.ciocaltea@collabora.com> References: <20231209203229.878730-1-cristian.ciocaltea@collabora.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Sat, 09 Dec 2023 12:40:44 -0800 (PST) Replace the old SET_{RUNTIME,SYSTEM_SLEEP}_PM_OPS() helpers with their modern alternatives and drop the now unnecessary __maybe_unused qualifier in the suspend and resume functions. Additionally, make use of pm_ptr() to ensure the PM ops are dropped when building with CONFIG_PM disabled. Signed-off-by: Cristian Ciocaltea --- sound/soc/amd/vangogh/pci-acp5x.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sound/soc/amd/vangogh/pci-acp5x.c b/sound/soc/amd/vangogh/pci-acp5x.c index 10755c07949c..af56ff09f02a 100644 --- a/sound/soc/amd/vangogh/pci-acp5x.c +++ b/sound/soc/amd/vangogh/pci-acp5x.c @@ -264,7 +264,7 @@ static int snd_acp5x_probe(struct pci_dev *pci, return ret; } -static int __maybe_unused snd_acp5x_suspend(struct device *dev) +static int snd_acp5x_suspend(struct device *dev) { int ret; struct acp5x_dev_data *adata; @@ -279,7 +279,7 @@ static int __maybe_unused snd_acp5x_suspend(struct device *dev) return ret; } -static int __maybe_unused snd_acp5x_resume(struct device *dev) +static int snd_acp5x_resume(struct device *dev) { int ret; struct acp5x_dev_data *adata; @@ -294,9 +294,8 @@ static int __maybe_unused snd_acp5x_resume(struct device *dev) } static const struct dev_pm_ops acp5x_pm = { - SET_RUNTIME_PM_OPS(snd_acp5x_suspend, - snd_acp5x_resume, NULL) - SET_SYSTEM_SLEEP_PM_OPS(snd_acp5x_suspend, snd_acp5x_resume) + RUNTIME_PM_OPS(snd_acp5x_suspend, snd_acp5x_resume, NULL) + SYSTEM_SLEEP_PM_OPS(snd_acp5x_suspend, snd_acp5x_resume) }; static void snd_acp5x_remove(struct pci_dev *pci) @@ -332,7 +331,7 @@ static struct pci_driver acp5x_driver = { .probe = snd_acp5x_probe, .remove = snd_acp5x_remove, .driver = { - .pm = &acp5x_pm, + .pm = pm_ptr(&acp5x_pm), } }; -- 2.43.0