From patchwork Sun Sep 9 19:10:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 10593415 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B7D3B921 for ; Sun, 9 Sep 2018 19:13:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A3A6B291CE for ; Sun, 9 Sep 2018 19:13:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 93F9D291DD; Sun, 9 Sep 2018 19:13:55 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 26FE3291CE for ; Sun, 9 Sep 2018 19:13:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=6eTo8hfo9b7IbCip4XT1+Ox1/oM9nz0Flv7xBwkxWC0=; b=pzz1eBPbRjl0hIr5c88mMsAwiX GNbOEm4cJTFEP9evvfIS/J3zBkZlLnTfT87GkOmSxeB+qDFq7rvw1X9OH8hzRSwyKOsr5QE7jhuF8 wriP6u5sJKURfVWm7YSwEg8J61IWx5zkXyMFqh4rvNkaTrTe4f35zswfld9ISluA+Eead4apNHgrO fJNYWU5lhES8ZbpnAfsnYrsoLwM+QfAOaUOUPsaW+YFobFv1Yhvkq/jBIctk7c0xDnroRrnk0aEqy q0ryy4fn1v9utKo8vVeZ4IFei0BQ3fGnAhQSBNs3iFSRCDiS58xqKdfA5S8dUrcBoVcMCEPFxqgsI lpOMWq0w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fz59Y-0008Bk-8B; Sun, 09 Sep 2018 19:13:48 +0000 Received: from vpn-0-22.aquilenet.fr ([2a0c:e300:4:22::] helo=leonov.paulk.fr) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fz58B-0007Sh-4M for linux-arm-kernel@lists.infradead.org; Sun, 09 Sep 2018 19:12:35 +0000 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id 353ACC01D2 for ; Sun, 9 Sep 2018 21:12:11 +0200 (CEST) Received: by gagarine.paulk.fr (Postfix, from userid 114) id 741A3C0FFC; Sun, 9 Sep 2018 21:12:09 +0200 (CEST) Received: from localhost.localdomain (collins [192.168.1.129]) by gagarine.paulk.fr (Postfix) with ESMTP id 985D5C0FEC; Sun, 9 Sep 2018 21:10:21 +0200 (CEST) From: Paul Kocialkowski To: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 3/4] media: cedrus: Wrap PHYS_PFN_OFFSET with ifdef and add dedicated comment Date: Sun, 9 Sep 2018 21:10:14 +0200 Message-Id: <20180909191015.20902-4-contact@paulk.fr> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180909191015.20902-1-contact@paulk.fr> References: <20180909191015.20902-1-contact@paulk.fr> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180909_121224_458882_1B18594A X-CRM114-Status: GOOD ( 14.00 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Hans Verkuil , Philipp Zabel , Alexandre Courbot , Maxime Ripard , Greg Kroah-Hartman , Randy Li , linux-sunxi@googlegroups.com, Tomasz Figa , Paul Kocialkowski , Chen-Yu Tsai , Laurent Pinchart , Thomas Petazzoni , Sakari Ailus , Paul Kocialkowski , Mauro Carvalho Chehab , Ezequiel Garcia MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Since PHYS_PFN_OFFSET is not defined for all architectures, it is requried to wrap it with ifdef so that it can be built on all architectures. Signed-off-by: Paul Kocialkowski --- drivers/staging/media/sunxi/cedrus/cedrus_hw.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/staging/media/sunxi/cedrus/cedrus_hw.c b/drivers/staging/media/sunxi/cedrus/cedrus_hw.c index f4307e8f7908..32adbcbe6175 100644 --- a/drivers/staging/media/sunxi/cedrus/cedrus_hw.c +++ b/drivers/staging/media/sunxi/cedrus/cedrus_hw.c @@ -199,8 +199,13 @@ int cedrus_hw_probe(struct cedrus_dev *dev) /* * The VPU is only able to handle bus addresses so we have to subtract * the RAM offset to the physcal addresses. + * + * This information will eventually be obtained from device-tree. */ + +#ifdef PHYS_PFN_OFFSET dev->dev->dma_pfn_offset = PHYS_PFN_OFFSET; +#endif ret = of_reserved_mem_device_init(dev->dev); if (ret && ret != -ENODEV) {