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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E20A1C433F5 for ; Mon, 6 Dec 2021 01:59:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232283AbhLFCD0 (ORCPT ); Sun, 5 Dec 2021 21:03:26 -0500 Received: from mga02.intel.com ([134.134.136.20]:22553 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232179AbhLFCDY (ORCPT ); Sun, 5 Dec 2021 21:03:24 -0500 X-IronPort-AV: E=McAfee;i="6200,9189,10189"; a="224482778" X-IronPort-AV: E=Sophos;i="5.87,290,1631602800"; d="scan'208";a="224482778" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Dec 2021 17:59:44 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,290,1631602800"; d="scan'208";a="514541979" Received: from allen-box.sh.intel.com ([10.239.159.118]) by orsmga008.jf.intel.com with ESMTP; 05 Dec 2021 17:59:37 -0800 From: Lu Baolu To: Greg Kroah-Hartman , Joerg Roedel , Alex Williamson , Bjorn Helgaas , Jason Gunthorpe , Christoph Hellwig , Kevin Tian , Ashok Raj Cc: Will Deacon , Robin Murphy , Dan Williams , rafael@kernel.org, Diana Craciun , Cornelia Huck , Eric Auger , Liu Yi L , Jacob jun Pan , Chaitanya Kulkarni , Stuart Yoder , Laurentiu Tudor , Thierry Reding , David Airlie , Daniel Vetter , Jonathan Hunter , Li Yang , Dmitry Osipenko , iommu@lists.linux-foundation.org, linux-pci@vger.kernel.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, Lu Baolu Subject: [PATCH v3 03/18] driver core: platform: Rename platform_dma_configure() Date: Mon, 6 Dec 2021 09:58:48 +0800 Message-Id: <20211206015903.88687-4-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211206015903.88687-1-baolu.lu@linux.intel.com> References: <20211206015903.88687-1-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The platform_dma_configure() is shared between platform and amba bus drivers. Rename the common helper to firmware_dma_configure() so that both platform and amba bus drivers could customize their dma_configure callbacks. Signed-off-by: Lu Baolu --- include/linux/platform_device.h | 2 +- drivers/amba/bus.c | 2 +- drivers/base/platform.c | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/linux/platform_device.h b/include/linux/platform_device.h index 7c96f169d274..4381c34af7e0 100644 --- a/include/linux/platform_device.h +++ b/include/linux/platform_device.h @@ -328,7 +328,7 @@ extern int platform_pm_restore(struct device *dev); #define platform_pm_restore NULL #endif -extern int platform_dma_configure(struct device *dev); +extern int firmware_dma_configure(struct device *dev); #ifdef CONFIG_PM_SLEEP #define USE_PLATFORM_PM_SLEEP_OPS \ diff --git a/drivers/amba/bus.c b/drivers/amba/bus.c index 720aa6cdd402..08c094124c0e 100644 --- a/drivers/amba/bus.c +++ b/drivers/amba/bus.c @@ -319,7 +319,7 @@ struct bus_type amba_bustype = { .probe = amba_probe, .remove = amba_remove, .shutdown = amba_shutdown, - .dma_configure = platform_dma_configure, + .dma_configure = firmware_dma_configure, .pm = &amba_pm, }; EXPORT_SYMBOL_GPL(amba_bustype); diff --git a/drivers/base/platform.c b/drivers/base/platform.c index 598acf93a360..125d708c0eb3 100644 --- a/drivers/base/platform.c +++ b/drivers/base/platform.c @@ -1449,8 +1449,7 @@ static void platform_shutdown(struct device *_dev) drv->shutdown(dev); } - -int platform_dma_configure(struct device *dev) +int firmware_dma_configure(struct device *dev) { enum dev_dma_attr attr; int ret = 0; @@ -1478,7 +1477,7 @@ struct bus_type platform_bus_type = { .probe = platform_probe, .remove = platform_remove, .shutdown = platform_shutdown, - .dma_configure = platform_dma_configure, + .dma_configure = firmware_dma_configure, .pm = &platform_dev_pm_ops, }; EXPORT_SYMBOL_GPL(platform_bus_type); -- 2.25.1