From patchwork Tue Oct 25 09:02:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tudor Ambarus X-Patchwork-Id: 13018862 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 83541C38A2D for ; Tue, 25 Oct 2022 09:22:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=i13CkLUBteilOFe+Jnxisq5YBP+fYjzN6AyqRxOBdAs=; b=Xib/ZdRrxeM3ad 3XIiM9vN3qd9GuKPHIHoZH/WT16wiKhCvhoPjXDMBq6dqjasU8F4CtGrzKW8ueCrAp5Dd8UNlQk9l Z72NjZb9i3HukhyHlqy17yLFLProm+ovJzOX+f9vW2K5oMaRxCKFutZ1H29zHqU1R20swGh5XvTlP iQ50pVYAAX4Cgx81RVr/UlV5/Ek6Mciqace3z0XLH5GAurTdteoDAoWfbekfjWjFpvRLydg4UJTX6 vZRRnyMttPg0mNrIxRep4jbfGJfwVwfkFFuuG1bGlduHzvaVOQUFaKWmw83YzHcfq1dAT7yCWw3Cf +LdC+dR3mhyR5CBbylXQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1onG85-004XUA-4m; Tue, 25 Oct 2022 09:21:49 +0000 Received: from esa.microchip.iphmx.com ([68.232.153.233]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1onFrM-004Pfe-Ie for linux-arm-kernel@lists.infradead.org; Tue, 25 Oct 2022 09:04:33 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1666688672; x=1698224672; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=evIATU0YdE3ohEp9vpmOjUBzxo8LdZOKKD7VgaBjLdE=; b=T9SedWLGIuGtNbstN7yvYo1e/dl8Arimh/9CMlAs9QdjtfjwNCcMf4bs QOkOo04JHVHUpda9zrlj7IDuadiw4CrZNLqFwqB0+Va8zRwAPUA5mRCpQ jxE6bE0fQgbzc9eoZCP+BkDw+vr4fxq9RXiFk286NoSbDNIbIj1dq1/aV NQekRsKYwcH6rNd4Shg1KP6DgAZ0zgRtyr9ilnOaLh45KwwC+c6pVen8X jBWvuKwh/a4Y9Pq6xVw3TltPPwIjZ6bmBMfdpmpBAfEIq//VYripbSsL2 QLTKMCiOYugMjLiQLx7v5UWDt9oNaJt2jzoG+YwaDlfehL/skeCkO0e5c A==; X-IronPort-AV: E=Sophos;i="5.95,211,1661842800"; d="scan'208";a="196910227" Received: from unknown (HELO email.microchip.com) ([170.129.1.10]) by esa1.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 25 Oct 2022 02:04:31 -0700 Received: from chn-vm-ex03.mchp-main.com (10.10.85.151) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.12; Tue, 25 Oct 2022 02:04:26 -0700 Received: from ROB-ULT-M18064N.mchp-main.com (10.10.115.15) by chn-vm-ex03.mchp-main.com (10.10.85.151) with Microsoft SMTP Server id 15.1.2507.12 via Frontend Transport; Tue, 25 Oct 2022 02:04:24 -0700 From: Tudor Ambarus To: , , Subject: [PATCH v2 25/32] dmaengine: at_hdmac: Use pm_ptr() Date: Tue, 25 Oct 2022 12:02:59 +0300 Message-ID: <20221025090306.297886-26-tudor.ambarus@microchip.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221025090306.297886-1-tudor.ambarus@microchip.com> References: <20221025090306.297886-1-tudor.ambarus@microchip.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221025_020432_651745_A1E5B6FF X-CRM114-Status: GOOD ( 12.28 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Tudor Ambarus , maciej.sosnowski@intel.com, linux-kernel@vger.kernel.org, mripard@kernel.org, linux-arm-kernel@lists.infradead.org, dmaengine@vger.kernel.org, torfl6749@gmail.com Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Use pm_ptr() macro to fill at_dma_driver.driver.pm. In case CONFIG_PM is not enabled, the macro will return NULL. When NULL, at_dma_dev_pm_ops will end up being unused, so prepend it with the __maybe_unused attribute. Signed-off-by: Tudor Ambarus --- drivers/dma/at_hdmac.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/dma/at_hdmac.c b/drivers/dma/at_hdmac.c index 444aa7d75ff5..4e3c519e6079 100644 --- a/drivers/dma/at_hdmac.c +++ b/drivers/dma/at_hdmac.c @@ -2084,7 +2084,7 @@ static int at_dma_resume_noirq(struct device *dev) return 0; } -static const struct dev_pm_ops at_dma_dev_pm_ops = { +static const struct dev_pm_ops __maybe_unused at_dma_dev_pm_ops = { .prepare = at_dma_prepare, .suspend_noirq = at_dma_suspend_noirq, .resume_noirq = at_dma_resume_noirq, @@ -2096,7 +2096,7 @@ static struct platform_driver at_dma_driver = { .id_table = atdma_devtypes, .driver = { .name = "at_hdmac", - .pm = &at_dma_dev_pm_ops, + .pm = pm_ptr(&at_dma_dev_pm_ops), .of_match_table = of_match_ptr(atmel_dma_dt_ids), }, };