From patchwork Thu Sep 14 15:09:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 722613 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 B2EF0EEAA4F for ; Thu, 14 Sep 2023 15:11:40 +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 56579E0D; Thu, 14 Sep 2023 17:10:48 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 56579E0D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1694704298; bh=2BK0DwRAQoMrGUuE8cNk9buwMbEPyQkyWK1zggA5zJA=; 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=SVnLGTpDTabB7B8Eu19JzrnrYK0dbidztcYExqdPXMcpjrfyfYwCAxIiEDbOGCqaO DHNcqIaHxONcolKvhgkvDTBvXDUZxznhcyirWUurNlIYxVC5Z3g7i/iFbJITGNk0SK pf/HStKYQe13WkRsDQ3D5VLROtBVRQdreeoeLIw0= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 212F0F80588; Thu, 14 Sep 2023 17:09:37 +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 B41BAF80588; Thu, 14 Sep 2023 17:09:36 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id E275CF80246; Thu, 14 Sep 2023 17:09:28 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 78A65F801F5 for ; Thu, 14 Sep 2023 17:09:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 78A65F801F5 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=U2f2ycsZ Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 38ECunMI020490; Thu, 14 Sep 2023 10:09:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= PODMain02222019; bh=WnCXK5CMo5WZNTakNp4qQKNK/w1RnuyYjuqgdkPghm0=; b= U2f2ycsZ9fKtWRz6kJpF1ySf9E3wBL2ZckyKtV50jVA4UAHgkpu/R4cAU5onjmL+ F2KPoIeFD+rBCcblRNi+JHTCKuMc36lSiIwqwQiDOmbC7HvEC4aIqq0fnJV+TC9g r2GznfuN2X6BwzoK28toeTyTB7URldrvraGtqE7BFixX+yy0PxW3FTM4BLpf7oUp kamDiIuu6t9qH0uUmUCJ/OYg58J6J+2UcyPQ5pf7oYb9XILj57KrlryFtj51ek/H W5Dtrod8cfIR1GlHgpNGahlkXTHMJsq1A639DJJ7vqDtLrW/WEsnXvIcyTGMcU0O n01RNOnXr6dGGYFh+gvcQA== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3t2y7sj90x-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Sep 2023 10:09:22 -0500 (CDT) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.37; Thu, 14 Sep 2023 16:09:20 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.37 via Frontend Transport; Thu, 14 Sep 2023 16:09:20 +0100 Received: from EDIN4L06LR3.ad.cirrus.com (EDIN4L06LR3.ad.cirrus.com [198.61.65.215]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 4394F357D; Thu, 14 Sep 2023 15:09:20 +0000 (UTC) From: Richard Fitzgerald To: CC: , , , Richard Fitzgerald Subject: [PATCH 1/3] ASoC: cs35l56: Use pm_ptr() Date: Thu, 14 Sep 2023 16:09:16 +0100 Message-ID: <20230914150918.14505-2-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230914150918.14505-1-rf@opensource.cirrus.com> References: <20230914150918.14505-1-rf@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-GUID: 967lDEXpuWNAHDyFXlSxrmMmlDwY7r5W X-Proofpoint-ORIG-GUID: 967lDEXpuWNAHDyFXlSxrmMmlDwY7r5W X-Proofpoint-Spam-Reason: safe Message-ID-Hash: QVAOCQDIIMUH6JKESQ2642R6CPQMRPMN X-Message-ID-Hash: QVAOCQDIIMUH6JKESQ2642R6CPQMRPMN X-MailFrom: prvs=46218c6399=rf@opensource.cirrus.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.8 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: Use pm_ptr() when setting the pointer to the dev_pm_ops so that it will be NULL if CONFIG_PM is disabled. This allows the dev_pm_ops to be compiled out in that case. Signed-off-by: Richard Fitzgerald --- sound/soc/codecs/cs35l56-i2c.c | 2 +- sound/soc/codecs/cs35l56-sdw.c | 2 +- sound/soc/codecs/cs35l56-spi.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sound/soc/codecs/cs35l56-i2c.c b/sound/soc/codecs/cs35l56-i2c.c index d10e0e2380e8..9e5670b09af6 100644 --- a/sound/soc/codecs/cs35l56-i2c.c +++ b/sound/soc/codecs/cs35l56-i2c.c @@ -72,7 +72,7 @@ MODULE_DEVICE_TABLE(acpi, cs35l56_asoc_acpi_match); static struct i2c_driver cs35l56_i2c_driver = { .driver = { .name = "cs35l56", - .pm = &cs35l56_pm_ops_i2c_spi, + .pm = pm_ptr(&cs35l56_pm_ops_i2c_spi), .acpi_match_table = ACPI_PTR(cs35l56_asoc_acpi_match), }, .id_table = cs35l56_id_i2c, diff --git a/sound/soc/codecs/cs35l56-sdw.c b/sound/soc/codecs/cs35l56-sdw.c index b433266b7844..ab960a1c171e 100644 --- a/sound/soc/codecs/cs35l56-sdw.c +++ b/sound/soc/codecs/cs35l56-sdw.c @@ -550,7 +550,7 @@ MODULE_DEVICE_TABLE(sdw, cs35l56_sdw_id); static struct sdw_driver cs35l56_sdw_driver = { .driver = { .name = "cs35l56", - .pm = &cs35l56_sdw_pm, + .pm = pm_ptr(&cs35l56_sdw_pm), }, .probe = cs35l56_sdw_probe, .remove = cs35l56_sdw_remove, diff --git a/sound/soc/codecs/cs35l56-spi.c b/sound/soc/codecs/cs35l56-spi.c index 9962703915e1..768ffe8213dc 100644 --- a/sound/soc/codecs/cs35l56-spi.c +++ b/sound/soc/codecs/cs35l56-spi.c @@ -70,7 +70,7 @@ MODULE_DEVICE_TABLE(acpi, cs35l56_asoc_acpi_match); static struct spi_driver cs35l56_spi_driver = { .driver = { .name = "cs35l56", - .pm = &cs35l56_pm_ops_i2c_spi, + .pm = pm_ptr(&cs35l56_pm_ops_i2c_spi), .acpi_match_table = ACPI_PTR(cs35l56_asoc_acpi_match), }, .id_table = cs35l56_id_spi, From patchwork Thu Sep 14 15:09:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 722614 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 48EC9EEAA4F for ; Thu, 14 Sep 2023 15:11:14 +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 3BAECDF9; Thu, 14 Sep 2023 17:10:22 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 3BAECDF9 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1694704272; bh=yuS4LqiamNVegaNDwGyrbh23zxE46D8RzBCwuBdmx2c=; 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=oRFzfzSBQXtrPDVYOR+0/k6vPFV3u2XsyUuOCsvefxD/EMsK+N+2WWmpSJWLUpI90 DSmKFXT74ceOwWmrHKwdRMCNJQIEWBtzK1jPhkuaAQb+PI9s6C5u+m4OKs8fGe8VKX xxyjxV5/3/Qm+kZPzHPXYMBnKlk7TH0CcdmvFDDY= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 2DC5CF80567; Thu, 14 Sep 2023 17:09:33 +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 978E5F80568; Thu, 14 Sep 2023 17:09:32 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 3E69FF80431; Thu, 14 Sep 2023 17:09:27 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 1B712F80212 for ; Thu, 14 Sep 2023 17:09:24 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 1B712F80212 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=L2RkqCAO Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 38ECunMJ020490; Thu, 14 Sep 2023 10:09:23 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= PODMain02222019; bh=qpNWS38UajD69TK6qtKglrFD9kQLiHSe+aaHNyCngyY=; b= L2RkqCAOJmW0NWKZsdwiBtMYAc8va7+WcNOJUnG+uzvt70HIzX+cw60yLx+DAM4d 5UlVQYwW/vfOjp7p18pBBfj+Ni+kNFoNrGf60LT8Oh6Y7Y2vTQTFPq5wMYskNUfl syvRwXyn5AVg1UFemhFMG6uRukX4lnrlJ14MAj/4XJ0OyYGIMKILiekDVkeNBxD1 pFucMF1QGY7tGSqHaX8lTQcHX6wW+xP0Xpm5XSxZ51jrMTqq2yAwAu5hJkG9Tk9o E7LoiR8qFZddlkgW3Gr4me18CzUP1CqehnPddRy9u/bwRGmcJykATIZpemHOWssV aKwOawRS/pQzrN1eL8pdkA== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3t2y7sj90x-3 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Sep 2023 10:09:23 -0500 (CDT) Received: from ediex01.ad.cirrus.com (198.61.84.80) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.37; Thu, 14 Sep 2023 16:09:20 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by ediex01.ad.cirrus.com (198.61.84.80) with Microsoft SMTP Server id 15.2.1118.37 via Frontend Transport; Thu, 14 Sep 2023 16:09:20 +0100 Received: from EDIN4L06LR3.ad.cirrus.com (EDIN4L06LR3.ad.cirrus.com [198.61.65.215]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id 8B6F63575; Thu, 14 Sep 2023 15:09:20 +0000 (UTC) From: Richard Fitzgerald To: CC: , , , Richard Fitzgerald Subject: [PATCH 2/3] ASoC: cs35l56: Use new export macro for dev_pm_ops Date: Thu, 14 Sep 2023 16:09:17 +0100 Message-ID: <20230914150918.14505-3-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230914150918.14505-1-rf@opensource.cirrus.com> References: <20230914150918.14505-1-rf@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-GUID: ROicgJ398I1eI0b7bPfdXemKNiuoBRtq X-Proofpoint-ORIG-GUID: ROicgJ398I1eI0b7bPfdXemKNiuoBRtq X-Proofpoint-Spam-Reason: safe Message-ID-Hash: 2RMPRBG3TDQT3GEV5LBOCBZK3YX4D4ZK X-Message-ID-Hash: 2RMPRBG3TDQT3GEV5LBOCBZK3YX4D4ZK X-MailFrom: prvs=46218c6399=rf@opensource.cirrus.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.8 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: pm.h now has macros to create and export the dev_pm_ops struct only if CONFIG_PM is enabled. Signed-off-by: Richard Fitzgerald --- sound/soc/codecs/cs35l56.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c index e6e366333a47..b7d3f768635b 100644 --- a/sound/soc/codecs/cs35l56.c +++ b/sound/soc/codecs/cs35l56.c @@ -1229,13 +1229,12 @@ void cs35l56_remove(struct cs35l56_private *cs35l56) } EXPORT_SYMBOL_NS_GPL(cs35l56_remove, SND_SOC_CS35L56_CORE); -const struct dev_pm_ops cs35l56_pm_ops_i2c_spi = { +EXPORT_NS_GPL_DEV_PM_OPS(cs35l56_pm_ops_i2c_spi, SND_SOC_CS35L56_CORE) = { SET_RUNTIME_PM_OPS(cs35l56_runtime_suspend_i2c_spi, cs35l56_runtime_resume_i2c_spi, NULL) SYSTEM_SLEEP_PM_OPS(cs35l56_system_suspend, cs35l56_system_resume) LATE_SYSTEM_SLEEP_PM_OPS(cs35l56_system_suspend_late, cs35l56_system_resume_early) NOIRQ_SYSTEM_SLEEP_PM_OPS(cs35l56_system_suspend_no_irq, cs35l56_system_resume_no_irq) }; -EXPORT_SYMBOL_NS_GPL(cs35l56_pm_ops_i2c_spi, SND_SOC_CS35L56_CORE); MODULE_DESCRIPTION("ASoC CS35L56 driver"); MODULE_IMPORT_NS(SND_SOC_CS35L56_SHARED); From patchwork Thu Sep 14 15:09:18 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Fitzgerald X-Patchwork-Id: 723200 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 E9ABDEEAA50 for ; Thu, 14 Sep 2023 15:11:16 +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 D15DADFA; Thu, 14 Sep 2023 17:10:23 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz D15DADFA DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1694704273; bh=r1gxdMk3moB8dZZdtJqZrh302rnCoVQAGeYO6cqNfZM=; 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=cMhYpbPYg6SaOH6JUunmWRWQmurKg3AQgcox1eKihIeN0aj8GP1HeX7JjZ0u4VGjx yadUuV28xeL+kMkS8OpP5fqSo/Rcncub4jr7qcbAyI6Um+NDDpocCuBIoqln7gPvjD s4RtdPrZk97Eq2o6kp0tPRPndQiXyWNb+XONJQEU= Received: by alsa1.perex.cz (Postfix, from userid 50401) id 93FD1F8057D; Thu, 14 Sep 2023 17:09:35 +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 53F69F80578; Thu, 14 Sep 2023 17:09:35 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id F29BEF80425; Thu, 14 Sep 2023 17:09:27 +0200 (CEST) Received: from mx0b-001ae601.pphosted.com (mx0b-001ae601.pphosted.com [67.231.152.168]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id CC61CF80246 for ; Thu, 14 Sep 2023 17:09:25 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz CC61CF80246 Authentication-Results: alsa1.perex.cz; dkim=pass (2048-bit key, unprotected) header.d=cirrus.com header.i=@cirrus.com header.a=rsa-sha256 header.s=PODMain02222019 header.b=emzWWtAO Received: from pps.filterd (m0077474.ppops.net [127.0.0.1]) by mx0b-001ae601.pphosted.com (8.17.1.22/8.17.1.22) with ESMTP id 38ECunMK020490; Thu, 14 Sep 2023 10:09:24 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cirrus.com; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s= PODMain02222019; bh=9/Xe635LD6iDoA7xW4TH+xL5WC3QyAf+GAeZOp4sAUk=; b= emzWWtAOakqSAJyaWRSZd69Koh67MWyLOxzsSBqGBb0y0XSJM7GyHA0Zjw8ljqDQ A5mTx3tbnEZkn7YoCLT7o3cPdQD9S3YA19wIvdxV6lJKglVBi9xGkCWcIMvcgV0Y 7A5nEEE2Ei2q7Axso7h+PYyLlfUQEk1zO1WqQlvmATL4j0qfzkiHhgCmDfQl9HeO SBg2553sWt6N/n7MbpwbsKhKqUZiT3MWCL/eY1vudsA8btOVpnv/vHbBib5RLiUm GgPMM2hJ9TmckOkOBYzCZ9+EsRR7j11ljLDJaosQkeUtrmWK71i1iiHsOEyGwBmv uoA1SZiW3AYRsYOn9OmiTw== Received: from ediex02.ad.cirrus.com ([84.19.233.68]) by mx0b-001ae601.pphosted.com (PPS) with ESMTPS id 3t2y7sj90x-4 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 14 Sep 2023 10:09:23 -0500 (CDT) Received: from ediex02.ad.cirrus.com (198.61.84.81) by ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.37; Thu, 14 Sep 2023 16:09:21 +0100 Received: from ediswmail.ad.cirrus.com (198.61.86.93) by anon-ediex02.ad.cirrus.com (198.61.84.81) with Microsoft SMTP Server id 15.2.1118.37 via Frontend Transport; Thu, 14 Sep 2023 16:09:21 +0100 Received: from EDIN4L06LR3.ad.cirrus.com (EDIN4L06LR3.ad.cirrus.com [198.61.65.215]) by ediswmail.ad.cirrus.com (Postfix) with ESMTP id D72A7357D; Thu, 14 Sep 2023 15:09:20 +0000 (UTC) From: Richard Fitzgerald To: CC: , , , Richard Fitzgerald Subject: [PATCH 3/3] ASoC: cs35l56: Omit cs35l56_pm_ops_i2c_spi if I2C/SPI not enabled Date: Thu, 14 Sep 2023 16:09:18 +0100 Message-ID: <20230914150918.14505-4-rf@opensource.cirrus.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20230914150918.14505-1-rf@opensource.cirrus.com> References: <20230914150918.14505-1-rf@opensource.cirrus.com> MIME-Version: 1.0 X-Proofpoint-GUID: 1pbGrrcizE69K0dpA49EEzUOomu1jFEx X-Proofpoint-ORIG-GUID: 1pbGrrcizE69K0dpA49EEzUOomu1jFEx X-Proofpoint-Spam-Reason: safe Message-ID-Hash: X2JKU36E5XZSIZ6B2C6CK67RDN2MH44L X-Message-ID-Hash: X2JKU36E5XZSIZ6B2C6CK67RDN2MH44L X-MailFrom: prvs=46218c6399=rf@opensource.cirrus.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.8 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: The cs35l56_pm_ops_i2c_spi struct is only needed if either the I2C or SPI modules are selected for building. Otherwise it would be unused bytes, so in that case omit it. Signed-off-by: Richard Fitzgerald --- sound/soc/codecs/cs35l56.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sound/soc/codecs/cs35l56.c b/sound/soc/codecs/cs35l56.c index b7d3f768635b..232af4e8faa4 100644 --- a/sound/soc/codecs/cs35l56.c +++ b/sound/soc/codecs/cs35l56.c @@ -1229,12 +1229,14 @@ void cs35l56_remove(struct cs35l56_private *cs35l56) } EXPORT_SYMBOL_NS_GPL(cs35l56_remove, SND_SOC_CS35L56_CORE); +#if IS_ENABLED(CONFIG_SND_SOC_CS35L56_I2C) || IS_ENABLED(CONFIG_SND_SOC_CS35L56_SPI) EXPORT_NS_GPL_DEV_PM_OPS(cs35l56_pm_ops_i2c_spi, SND_SOC_CS35L56_CORE) = { SET_RUNTIME_PM_OPS(cs35l56_runtime_suspend_i2c_spi, cs35l56_runtime_resume_i2c_spi, NULL) SYSTEM_SLEEP_PM_OPS(cs35l56_system_suspend, cs35l56_system_resume) LATE_SYSTEM_SLEEP_PM_OPS(cs35l56_system_suspend_late, cs35l56_system_resume_early) NOIRQ_SYSTEM_SLEEP_PM_OPS(cs35l56_system_suspend_no_irq, cs35l56_system_resume_no_irq) }; +#endif MODULE_DESCRIPTION("ASoC CS35L56 driver"); MODULE_IMPORT_NS(SND_SOC_CS35L56_SHARED);