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: 10593409 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 EABFA921 for ; Sun, 9 Sep 2018 19:12:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DADF029070 for ; Sun, 9 Sep 2018 19:12:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE57129208; Sun, 9 Sep 2018 19:12:19 +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=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 763C029070 for ; Sun, 9 Sep 2018 19:12:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726684AbeIJAC4 (ORCPT ); Sun, 9 Sep 2018 20:02:56 -0400 Received: from leonov.paulk.fr ([185.233.101.22]:44800 "EHLO leonov.paulk.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726599AbeIJAC4 (ORCPT ); Sun, 9 Sep 2018 20:02:56 -0400 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id 330EBC0206; Sun, 9 Sep 2018 21:12:17 +0200 (CEST) Received: by gagarine.paulk.fr (Postfix, from userid 114) id E7FDCC0FFE; Sun, 9 Sep 2018 21:12:15 +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 Cc: Maxime Ripard , Paul Kocialkowski , Mauro Carvalho Chehab , Greg Kroah-Hartman , Chen-Yu Tsai , Thomas Petazzoni , linux-sunxi@googlegroups.com, Randy Li , Hans Verkuil , Ezequiel Garcia , Tomasz Figa , Alexandre Courbot , Philipp Zabel , Laurent Pinchart , Sakari Ailus , Paul Kocialkowski 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> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.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) {