From patchwork Wed Nov 19 11:15:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 41138 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f70.google.com (mail-la0-f70.google.com [209.85.215.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 475A520CBB for ; Wed, 19 Nov 2014 11:16:44 +0000 (UTC) Received: by mail-la0-f70.google.com with SMTP id q1sf259933lam.1 for ; Wed, 19 Nov 2014 03:16:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:sender:precedence:list-id :x-original-sender:x-original-authentication-results:mailing-list :list-post:list-help:list-archive:list-unsubscribe; bh=94FR4Xru1M3sKKoeCSLdUnF2ey8/zEczj0fAWzlO944=; b=AqMO7J0JIfLIIS3anMh05QXnV5TJMCsgmHX4hrrz4CVvBcU7/58aCvu7goIGLPAOin LdCnRtwViPMJGxAW4Cnz5J85qfJ941OUavL2HszgySchadjibYbgWJUb7VFnUxRNLyTw McNFAkFAo4/+fzvJQMsEu40TQlnUwKBvOJYsUT2qelHOR62tHacYqwGMQaOVPsQ/2onq 8JBha3T7OJXHlfeYxgCYt/zSkobjq21dHBjl3/pDsPNCnF9rD9jz56hZ6nXSYKV+oco9 gqZfeokkMCIW33ZVwdblg5GieDCtAhx4XCaHXsVWfKcR3OZ6TwDPQteN10xytWEBhBtz yjJQ== X-Gm-Message-State: ALoCoQlgcOdipLLSJr1qebbcGY6qSv1vstYDVACIvA3e/Sk6FfTAgV3KhWI1rt53bf5r1tlKJujj X-Received: by 10.112.169.68 with SMTP id ac4mr24955lbc.24.1416395803316; Wed, 19 Nov 2014 03:16:43 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.6.169 with SMTP id c9ls1296691laa.104.gmail; Wed, 19 Nov 2014 03:16:42 -0800 (PST) X-Received: by 10.152.120.73 with SMTP id la9mr41625695lab.23.1416395802531; Wed, 19 Nov 2014 03:16:42 -0800 (PST) Received: from mail-la0-f41.google.com (mail-la0-f41.google.com. [209.85.215.41]) by mx.google.com with ESMTPS id n9si1465137lbc.57.2014.11.19.03.16.42 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 19 Nov 2014 03:16:42 -0800 (PST) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) client-ip=209.85.215.41; Received: by mail-la0-f41.google.com with SMTP id gf13so302641lab.28 for ; Wed, 19 Nov 2014 03:16:42 -0800 (PST) X-Received: by 10.112.45.102 with SMTP id l6mr4742616lbm.46.1416395802459; Wed, 19 Nov 2014 03:16:42 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.112.184.201 with SMTP id ew9csp64296lbc; Wed, 19 Nov 2014 03:16:41 -0800 (PST) X-Received: by 10.66.163.129 with SMTP id yi1mr12149434pab.149.1416395799939; Wed, 19 Nov 2014 03:16:39 -0800 (PST) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id xo9si2087857pbc.210.2014.11.19.03.16.39 for ; Wed, 19 Nov 2014 03:16:39 -0800 (PST) Received-SPF: none (google.com: linux-samsung-soc-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754439AbaKSLQe (ORCPT + 4 others); Wed, 19 Nov 2014 06:16:34 -0500 Received: from mailout4.w1.samsung.com ([210.118.77.14]:61914 "EHLO mailout4.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754398AbaKSLQc (ORCPT ); Wed, 19 Nov 2014 06:16:32 -0500 Received: from eucpsbgm2.samsung.com (unknown [203.254.199.245]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NFA004TXA44EA40@mailout4.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Wed, 19 Nov 2014 11:19:16 +0000 (GMT) X-AuditID: cbfec7f5-b7f956d000005ed7-d7-546c7c0f7fb5 Received: from eusync1.samsung.com ( [203.254.199.211]) by eucpsbgm2.samsung.com (EUCPMTA) with SMTP id 74.B2.24279.F0C7C645; Wed, 19 Nov 2014 11:16:31 +0000 (GMT) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync1.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NFA00GC59YMTL30@eusync1.samsung.com>; Wed, 19 Nov 2014 11:16:30 +0000 (GMT) From: Marek Szyprowski To: iommu@lists.linux-foundation.org, linux-samsung-soc@vger.kernel.org, linux-arm-kernel@lists.infradead.org Cc: Marek Szyprowski , linaro-mm-sig@lists.linaro.org, Arnd Bergmann , Shaik Ameer Basha , Cho KyongHo , Joerg Roedel , Thierry Reding , Olof Johansson , Laurent Pinchart , Rob Herring , Will Deacon , David Wodhouse , Inki Dae , Kukjin Kim , Tomasz Figa , Kyungmin Park Subject: [PATCH v3 12/19] iommu: exynos: remove useless device_add/remove callbacks Date: Wed, 19 Nov 2014 12:15:41 +0100 Message-id: <1416395748-10731-13-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1416395748-10731-1-git-send-email-m.szyprowski@samsung.com> References: <1416395748-10731-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrJLMWRmVeSWpSXmKPExsVy+t/xy7r8NTkhBjeuMln8nXSM3WLiysnM FpPuT2CxWLDf2qJz9gZ2i94FV9kszja9YbfonLiE3eLLlYdMFpseX2O1mHF+H5PF2iN32S1O Xf/MZvGv9yCjxf89O9gtjjzczW6xatcfRovbv/ksXn48weIg7PHk4DwmjzXz1jB6/P41idFj 56y77B6zO2ayemxeoeWxaVUnm8fmJfUet/89ZvaYfGM5o8eVE02sHr3N79g8+rasYvT4vEku gC+KyyYlNSezLLVI3y6BK+Pb6f9MBZt4K3p2X2BrYJzB3cXIySEhYCLx7s5UNghbTOLCvfVA NheHkMBSRomnDW2MEE4fk8Td3onMIFVsAoYSXW+7wDpEBPIlXuz9ywJiMwu8YZG4t8kQxBYW CJX4+qabqYuRg4NFQFVi/5cAkDCvgKfE1TlHmCGWyUn8f7kCrIQTKH79BdgUIQEPiabp61gn MPIuYGRYxSiaWppcUJyUnmukV5yYW1yal66XnJ+7iRESHV93MC49ZnWIUYCDUYmHt6E4J0SI NbGsuDL3EKMEB7OSCG9xIVCINyWxsiq1KD++qDQntfgQIxMHp1QD47z6q+Lzefx626VCtrio ZBo33510156f/bfSlM+e0fdl1atWXVHn61j1TYb/85uYlzt28f+fzx3dy88dkn6i+6il1P21 G57v7nR9kLN25YLJsluXveaWm50QwKmQ7iuRf5470PL5Uu/LtZqBN4oa5P9L/4/YcTOoZ0PS Blfz3d01VlH5hxz/K7EUZyQaajEXFScCAEq9cWJsAgAA Sender: linux-samsung-soc-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-samsung-soc@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: m.szyprowski@samsung.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.215.41 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The driver doesn't need to do anything important in device add/remove callbacks, because initialization will be done from device-tree specific callbacks added later. IOMMU groups created by current code were never used. Signed-off-by: Marek Szyprowski --- drivers/iommu/exynos-iommu.c | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/drivers/iommu/exynos-iommu.c b/drivers/iommu/exynos-iommu.c index a9616cd64e37..93b97df772f1 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -1056,32 +1056,6 @@ static phys_addr_t exynos_iommu_iova_to_phys(struct iommu_domain *domain, return phys; } -static int exynos_iommu_add_device(struct device *dev) -{ - struct iommu_group *group; - int ret; - - group = iommu_group_get(dev); - - if (!group) { - group = iommu_group_alloc(); - if (IS_ERR(group)) { - dev_err(dev, "Failed to allocate IOMMU group\n"); - return PTR_ERR(group); - } - } - - ret = iommu_group_add_device(group, dev); - iommu_group_put(group); - - return ret; -} - -static void exynos_iommu_remove_device(struct device *dev) -{ - iommu_group_remove_device(dev); -} - static const struct iommu_ops exynos_iommu_ops = { .domain_init = exynos_iommu_domain_init, .domain_destroy = exynos_iommu_domain_destroy, @@ -1090,8 +1064,6 @@ static const struct iommu_ops exynos_iommu_ops = { .map = exynos_iommu_map, .unmap = exynos_iommu_unmap, .iova_to_phys = exynos_iommu_iova_to_phys, - .add_device = exynos_iommu_add_device, - .remove_device = exynos_iommu_remove_device, .pgsize_bitmap = SECT_SIZE | LPAGE_SIZE | SPAGE_SIZE, };