Message ID | 20221025090306.297886-26-tudor.ambarus@microchip.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp893315wru; Tue, 25 Oct 2022 02:11:26 -0700 (PDT) X-Google-Smtp-Source: AMsMyM4Sh/PfhQqdpE3csMoLhYFrt5jZYZALdFT+y//UeFBN+8qyzErP3RupE/nqCmLT6WxdkBcL X-Received: by 2002:a17:902:bd98:b0:182:631b:7dd5 with SMTP id q24-20020a170902bd9800b00182631b7dd5mr37061382pls.165.1666689085988; Tue, 25 Oct 2022 02:11:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1666689085; cv=none; d=google.com; s=arc-20160816; b=Eqa6M5FfYrtxYw4tENyLYZJaoCf9RwKX80UFQdx8rCAMSC4y6wGR8aGWqZhiogdfDa z86NO6hlkbQdneexiIeFPkOzCkNawq4NToWkcr+BaFt/UYAS0Ux8kYVCLaoEBkHezDlv LR2PUU3aP3px9e0prM7Czo5W9vfdJCvjkUH7ri9Vh0MjBUmg3o6BgTVlqDym6oFV2WOn hHkOtjlUZ+BQJUEj2tX+f3Hj8D3vJZWfQfdv4Na0Z8t5Rhw5qreT4s48bK80Ciyq82l5 kQj9WU/fFBfhL9tNHpD2xvnY5U2RVq1RpWLkH8cbatwiOT2VthdlgdlNyH1pKIt5AkQ9 WC9Q== 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=xs/WvSCAHYOJ/0bz66vchQ6Wued2Y3ydUZe8hV7rcHc=; b=LtA+bSazzVuuG82tk85ePU0xp5XpuiTxUQurGmafdqaQMyUEhZvzXqP2ooYCJVLAGV Zm7rLIM+aacpd0jBRYbccpFkAslovLS3Z0FtpPAqSMdq/UZxesFFRAahdm2Ouxu6D66o lF/1A8fmKNzUrB9yCxDoPoPjYdoIE6zID4/nz21dMfUWU9P6K6sgHtA+pljNHuZBqmHx R3wB3rjgSXfV4DkpF6jPKd0qNm7SHQM1obnMfu5GjXkcHXZoVuNWgs21rO5MR659RAnu dli/j8WT5I7I3uWyMPkdN19ro0g74kveuS3Ig7z8DvRKD2YM3d66XS/mmbz2VpubKmPA T3Vg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=T9SedWLG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jn20-20020a170903051400b00186b945c0bdsi2256693plb.72.2022.10.25.02.11.12; Tue, 25 Oct 2022 02:11:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@microchip.com header.s=mchp header.b=T9SedWLG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=microchip.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232334AbiJYJIS (ORCPT <rfc822;lucius.rs.storz@gmail.com> + 99 others); Tue, 25 Oct 2022 05:08:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231193AbiJYJHK (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 25 Oct 2022 05:07:10 -0400 Received: from esa.microchip.iphmx.com (esa.microchip.iphmx.com [68.232.153.233]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D271CF853; Tue, 25 Oct 2022 02:04:32 -0700 (PDT) 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 <tudor.ambarus@microchip.com> To: <vkoul@kernel.org>, <peda@axentia.se>, <du@axentia.se> CC: <maciej.sosnowski@intel.com>, <nicolas.ferre@microchip.com>, <mripard@kernel.org>, <torfl6749@gmail.com>, <linux-kernel@vger.kernel.org>, <dmaengine@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, "Tudor Ambarus" <tudor.ambarus@microchip.com> 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 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Spam-Status: No, score=-4.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_PASS,URIBL_BLOCKED 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1747650175497378483?= X-GMAIL-MSGID: =?utf-8?q?1747650175497378483?= |
Series |
dmaengine: at_hdmac: Fix concurrency bugs and then convert to virt-dma
|
|
Commit Message
Tudor Ambarus
Oct. 25, 2022, 9:02 a.m. UTC
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 <tudor.ambarus@microchip.com>
---
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), }, };