From patchwork Thu Aug 8 18:49:42 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabio Estevam X-Patchwork-Id: 13758111 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 alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 969FEC52D7E for ; Thu, 8 Aug 2024 18:53:32 +0000 (UTC) Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id BDBA8852; Thu, 8 Aug 2024 20:53:19 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz BDBA8852 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1723143209; bh=MhEsQ1YhBS7ENCam3SZu+v3ER3kvrJKDxuJz+ioi4mg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-Id: List-Archive:List-Help:List-Owner:List-Post:List-Subscribe: List-Unsubscribe:From; b=eRscUKmH5IP1gJ66gy/t3G8U+2AOi3kihbFNpFuKXQjS/RB1W/sPKH8oJL4LtCyop FF/Fj6lkqQd6GQGA1Akr7pbn8bdZ+yGS2x1Pa7c1VJVBfzz8Y+jj6bQ3V2miapzzIM IXS45FwJC6n4rnjUd5Z/WZpDzdmF7Y3ExOaHFgDs= Received: by alsa1.perex.cz (Postfix, from userid 50401) id D340DF80675; Thu, 8 Aug 2024 20:52:01 +0200 (CEST) Received: from mailman-core.alsa-project.org (mailman-core.alsa-project.org [10.254.200.10]) by alsa1.perex.cz (Postfix) with ESMTP id 8834BF80671; Thu, 8 Aug 2024 20:52:00 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id AE73BF802DB; Thu, 8 Aug 2024 20:50:41 +0200 (CEST) Received: from mail-pj1-x102d.google.com (mail-pj1-x102d.google.com [IPv6:2607:f8b0:4864:20::102d]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 2B1DDF80448 for ; Thu, 8 Aug 2024 20:50:37 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 2B1DDF80448 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20230601 header.b=TM9S7SMV Received: by mail-pj1-x102d.google.com with SMTP id 98e67ed59e1d1-2cb67992a5cso233339a91.1 for ; Thu, 08 Aug 2024 11:50:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1723143036; x=1723747836; darn=alsa-project.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=h4pHrt2xUkfCwAqwX3B5Nmo1NO5wRbMR//VAm7OLTR4=; b=TM9S7SMV548/pxvDfZpayeLfEB72qZRMi61w3fVUZB1j3RpLb0PXIVHJ7LvYhHh+Rk qSpiTEHT9/hWPkuO+r4DUN7yUHsAWvU7uGlPDxXANRHM0eSXVNhBU++Y8EiCvhWlI76c 7NWaEJ/nGODm9gzcS/cIR/8H6OUwWq4cynUre7GlSAQb78YA9g519PJHZUqqAdaaIGKg AHWUxxyHZbrroN38+2xWrkdODre09AP/qonAguOcaxWyVU3E4b+8mt3+tvgJyA4p33hx N3ejTSnV7yRGFs9MVpi917OclErLK8s5LPxgyXnA5AGKtzaWnSJ4icWy6VD+1lvibcUm 5+2g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723143036; x=1723747836; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=h4pHrt2xUkfCwAqwX3B5Nmo1NO5wRbMR//VAm7OLTR4=; b=NG/X5mkC/ans/6zQpSd4oefdW+EIbz5aEZ/jZEkMrlQyDl4B+LglJOVywNqjjtdFeT FVg5sPsGEIvSu5DcsesHXYaI9Kn1gErQIc/9XCG8Y7zlUde7N4ACwcOBqbSQhHZtD5W9 A1z7uvBCOuZ07VmvgQgm++F4d0zPF+lliyTQlJto6UNb5OTKMytaxIGPxKEqh7nGU97y TYvxLWB8UbBWu1HScWvk/iDBkhCmyEBduzlhRjco189mls2VSmerRVnhCOzQYD23VE0b FDnOykvW3MvGF1WvJZRYdWBJ2OjOVTvfw0khQPZ1cFSSR8tQINhKl0xv/BXzidNudytd 2kOA== X-Forwarded-Encrypted: i=1; AJvYcCVB3v+k20lM9cM0qfZA3BuCqV+5D6XGbZmON8m2yC2B5/BZN3SGZtJZcATk80pjzAjHDVVl2qeyN+oHTeK2Duz5YFxSIqW+4n/3gkQ= X-Gm-Message-State: AOJu0Yxepn1IIwTZ2uDhYR//EvniujfSZNJSBJ0JDh1HXjseoiYnNK3r gceXhLu3C7u1ZGCSinXPCrLWgUI981cJid8KNZ5m1Retu0xt+gTg X-Google-Smtp-Source: AGHT+IHVBpJ7JLbHxySN4W4Pw59z+IlKERxq1z4tvfyZQyyHxOHfggs8RpFx3c9G+SzwYZjoyhgcEQ== X-Received: by 2002:a05:6a20:4325:b0:1c4:ccef:cd6e with SMTP id adf61e73a8af0-1c6fd040521mr2000385637.8.1723143035986; Thu, 08 Aug 2024 11:50:35 -0700 (PDT) Received: from fabio-Precision-3551.. ([2804:14c:485:4b61:d689:1e02:dd79:b72c]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-710cb2e4acesm1466354b3a.141.2024.08.08.11.50.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Aug 2024 11:50:35 -0700 (PDT) From: Fabio Estevam To: broonie@kernel.org Cc: shengjiu.wang@gmail.com, alsa-devel@alsa-project.org, Fabio Estevam Subject: [PATCH 5/7] ASoC: fsl_ssi: Switch to SYSTEM_SLEEP_PM_OPS Date: Thu, 8 Aug 2024 15:49:42 -0300 Message-Id: <20240808184944.267686-5-festevam@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240808184944.267686-1-festevam@gmail.com> References: <20240808184944.267686-1-festevam@gmail.com> MIME-Version: 1.0 Message-ID-Hash: V75ECC4P74CGLHMLBHLE4TANX3C7BYRP X-Message-ID-Hash: V75ECC4P74CGLHMLBHLE4TANX3C7BYRP X-MailFrom: festevam@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; header-match-alsa-devel.alsa-project.org-0; header-match-alsa-devel.alsa-project.org-1; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header X-Mailman-Version: 3.3.9 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Fabio Estevam Replace SET_SYSTEM_SLEEP_PM_OPS() with its modern SYSTEM_SLEEP_PM_OPS() alternative. The combined usage of pm_sleep_ptr() and SYSTEM_SLEEP_PM_OPS() allows the compiler to evaluate if the suspend/resume() functions are used at build time or are simply dead code. This allows removing the CONFIG_PM_SLEEP ifdefery from the suspend/resume() functions. Signed-off-by: Fabio Estevam --- sound/soc/fsl/fsl_ssi.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/fsl/fsl_ssi.c b/sound/soc/fsl/fsl_ssi.c index 4ca3a16f7ac0..c4c1d9c44056 100644 --- a/sound/soc/fsl/fsl_ssi.c +++ b/sound/soc/fsl/fsl_ssi.c @@ -1693,7 +1693,6 @@ static void fsl_ssi_remove(struct platform_device *pdev) } } -#ifdef CONFIG_PM_SLEEP static int fsl_ssi_suspend(struct device *dev) { struct fsl_ssi *ssi = dev_get_drvdata(dev); @@ -1723,17 +1722,16 @@ static int fsl_ssi_resume(struct device *dev) return regcache_sync(regs); } -#endif /* CONFIG_PM_SLEEP */ static const struct dev_pm_ops fsl_ssi_pm = { - SET_SYSTEM_SLEEP_PM_OPS(fsl_ssi_suspend, fsl_ssi_resume) + SYSTEM_SLEEP_PM_OPS(fsl_ssi_suspend, fsl_ssi_resume) }; static struct platform_driver fsl_ssi_driver = { .driver = { .name = "fsl-ssi-dai", .of_match_table = fsl_ssi_ids, - .pm = &fsl_ssi_pm, + .pm = pm_sleep_ptr(&fsl_ssi_pm), }, .probe = fsl_ssi_probe, .remove_new = fsl_ssi_remove,