From patchwork Wed Sep 12 19:45:44 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Omar Ramirez Luna X-Patchwork-Id: 1446281 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id B4628DF238 for ; Wed, 12 Sep 2012 19:48:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752268Ab2ILTqG (ORCPT ); Wed, 12 Sep 2012 15:46:06 -0400 Received: from mail-ob0-f174.google.com ([209.85.214.174]:39351 "EHLO mail-ob0-f174.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752209Ab2ILTqD (ORCPT ); Wed, 12 Sep 2012 15:46:03 -0400 Received: by obbuo13 with SMTP id uo13so3246390obb.19 for ; Wed, 12 Sep 2012 12:46:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=trQd8Rq66CKBdfVLj1zRBQTAQm14ctuh3kW6ZH7r6D8=; b=JfBrqkikopFKacQJXuZrxDxJOM50VPFHNWsTxSmA2IWgEc24u1By9dQOVrZhxZQrLx dWPriQII2WgcO/xGv58iZ/RFUGSLqVWw08pu/oepRVOnxjgpdO0AVd3Kweir3bT0Z/Ey FqCfgCWvpuiRPbme7vkN023gaSrwV9vfd7JGGajJJ0Zq5vEiWJ4bTYwLF3vK61+bYR0k qnV6i/AlS4NWFEINSwCKFFHmMj9FMB6A0qyBgG8q0BSI3IHPpK5MFChLVHtpsBSFQgBX adCHmYMX4bReeqLQoWVz9uMhcbpS0i4vFQJ1QO8gsRfh2lxgTwyiy9YFXy0erRRMb+rs Dm7Q== Received: by 10.60.31.161 with SMTP id b1mr3789911oei.76.1347479161947; Wed, 12 Sep 2012 12:46:01 -0700 (PDT) Received: from uda0273944.am.dhcp.ti.com (dragon.ti.com. [192.94.94.33]) by mx.google.com with ESMTPS id a6sm17041227oeh.1.2012.09.12.12.46.00 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 12 Sep 2012 12:46:01 -0700 (PDT) From: Omar Ramirez Luna To: Tony Lindgren , Benoit Cousson , Ohad Ben-Cohen , Joerg Roedel Cc: Russell King , Omar Ramirez Luna , Rajendra Nayak , Peter Ujfalusi , Laurent Pinchart , devicetree-discuss@lists.ozlabs.org, linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-omap@vger.kernel.org Subject: [PATCH v2 1/9] ARM: OMAP: iommu: fix including iommu.h without IOMMU_API selected Date: Wed, 12 Sep 2012 14:45:44 -0500 Message-Id: <1347479152-588-2-git-send-email-omar.luna@linaro.org> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1347479152-588-1-git-send-email-omar.luna@linaro.org> References: <1347479152-588-1-git-send-email-omar.luna@linaro.org> X-Gm-Message-State: ALoCoQmEyL5veQ9jIArXKxJRrRQlYQtzg3jUtNro10QwB8gXwuQkSL3O62DBe+SuumLybMVri9Or Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org If included without IOMMU_API being selected it will break compilation: arch/arm/plat-omap/include/plat/iommu.h: In function 'dev_to_omap_iommu': arch/arm/plat-omap/include/plat/iommu.h:148: error: 'struct dev_archdata' has no member named 'iommu' This will be seen when hwmod includes iommu.h to get the structure for attributes. Also needed for tidspbridge incremental migration to use iommu code. Cc: Tony Lindgren Signed-off-by: Omar Ramirez Luna Acked-by: Laurent Pinchart --- arch/arm/plat-omap/include/plat/iommu.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/arch/arm/plat-omap/include/plat/iommu.h b/arch/arm/plat-omap/include/plat/iommu.h index 88be3e6..e58d571 100644 --- a/arch/arm/plat-omap/include/plat/iommu.h +++ b/arch/arm/plat-omap/include/plat/iommu.h @@ -126,6 +126,7 @@ struct omap_iommu_arch_data { struct omap_iommu *iommu_dev; }; +#ifdef CONFIG_IOMMU_API /** * dev_to_omap_iommu() - retrieves an omap iommu object from a user device * @dev: iommu client device @@ -136,6 +137,7 @@ static inline struct omap_iommu *dev_to_omap_iommu(struct device *dev) return arch_data->iommu_dev; } +#endif /* IOMMU errors */ #define OMAP_IOMMU_ERR_TLB_MISS (1 << 0)