From patchwork Tue Sep 16 11:54:38 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Szyprowski X-Patchwork-Id: 37453 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-la0-f69.google.com (mail-la0-f69.google.com [209.85.215.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id EFE982057E for ; Tue, 16 Sep 2014 11:55:28 +0000 (UTC) Received: by mail-la0-f69.google.com with SMTP id ty20sf3077397lab.4 for ; Tue, 16 Sep 2014 04:55:24 -0700 (PDT) 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=x7uOIUTuS47XNcOpSSlkznQcdtduxsbX4NcT81GgHMM=; b=US3MHpAi7Dte0bzQkPCEMDpFOhlbqrttNNlADwyAOoK2uvjIe/h5NoA1wVqp2v/Lrr BpS0fhJ/5rcuri+PqGAxzEHpezmjjcf2srQGlGYeIgSVuTf9UGfpe94kQq8i9XBdoIBk 1qMVK7QCHVG5l1AOo6DpWJ2bKopRs2wKUmTILClR+VenoxRzEUulNdkyJYpCduYpVOKe FxbVyjSrX73jB+N0yGar0m3ZtkTEdwtHDoylMpEVshqF73xYFlqsrIe6IloKbWRRm4WZ 2rGIMEYvd1nbUPMS2svvzqeMRTgCwfMe4njkoFdtfqvAwSM6nmX2sXwuvIV1MjJzWY6N chAQ== X-Gm-Message-State: ALoCoQkBrMg2WIZ1fU0erZOBntfLP6kETce0o3g0GPG3HxinaPWVRlO9Jnu2mac2zTLJPnqF74cC X-Received: by 10.112.149.67 with SMTP id ty3mr8390624lbb.1.1410868523018; Tue, 16 Sep 2014 04:55:23 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.152.27.225 with SMTP id w1ls511935lag.2.gmail; Tue, 16 Sep 2014 04:55:22 -0700 (PDT) X-Received: by 10.152.37.169 with SMTP id z9mr17154602laj.66.1410868522638; Tue, 16 Sep 2014 04:55:22 -0700 (PDT) Received: from mail-la0-f49.google.com (mail-la0-f49.google.com [209.85.215.49]) by mx.google.com with ESMTPS id qf7si10342880lbb.135.2014.09.16.04.55.20 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 16 Sep 2014 04:55:20 -0700 (PDT) Received-SPF: none (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) client-ip=209.85.215.49; Received: by mail-la0-f49.google.com with SMTP id pv20so6633312lab.22 for ; Tue, 16 Sep 2014 04:55:20 -0700 (PDT) X-Received: by 10.112.75.233 with SMTP id f9mr10290724lbw.102.1410868520559; Tue, 16 Sep 2014 04:55:20 -0700 (PDT) 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.130.169 with SMTP id of9csp374299lbb; Tue, 16 Sep 2014 04:55:19 -0700 (PDT) X-Received: by 10.68.109.5 with SMTP id ho5mr50771980pbb.13.1410868519059; Tue, 16 Sep 2014 04:55:19 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id zp8si29178866pac.130.2014.09.16.04.55.18 for ; Tue, 16 Sep 2014 04:55:18 -0700 (PDT) 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 S1754337AbaIPLzM (ORCPT + 6 others); Tue, 16 Sep 2014 07:55:12 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:58151 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754319AbaIPLzD (ORCPT ); Tue, 16 Sep 2014 07:55:03 -0400 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout2.w1.samsung.com (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTP id <0NBZ00N9BT8H3SB0@mailout2.w1.samsung.com> for linux-samsung-soc@vger.kernel.org; Tue, 16 Sep 2014 12:57:53 +0100 (BST) X-AuditID: cbfec7f4-b7f156d0000063c7-c1-54182515361f Received: from eusync2.samsung.com ( [203.254.199.212]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 78.38.25543.51528145; Tue, 16 Sep 2014 12:55:01 +0100 (BST) Received: from amdc1339.digital.local ([106.116.147.30]) by eusync2.samsung.com (Oracle Communications Messaging Server 7u4-23.01 (7.0.4.23.0) 64bit (built Aug 10 2011)) with ESMTPA id <0NBZ00CMIT3CL960@eusync2.samsung.com>; Tue, 16 Sep 2014 12:55:01 +0100 (BST) 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 v2 11/18] iommu: exynos: remove useless device_add/remove callbacks Date: Tue, 16 Sep 2014 13:54:38 +0200 Message-id: <1410868485-4143-12-git-send-email-m.szyprowski@samsung.com> X-Mailer: git-send-email 1.9.2 In-reply-to: <1410868485-4143-1-git-send-email-m.szyprowski@samsung.com> References: <1410868485-4143-1-git-send-email-m.szyprowski@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrFLMWRmVeSWpSXmKPExsVy+t/xK7qiqhIhBhP6LSz+TjrGbjFx5WRm i0n3J7BYLNhvbdE5ewO7Re+Cq2wWZ5vesFt0TlzCbvHlykMmi02Pr7FazDi/j8li7ZG77Ban rn9ms/jXe5DR4v+eHewWRx7uZrdYtesPo8Xt33wWLz+eYHEQ9nhycB6Tx5p5axg9fv+axOix c9Zddo/ZHTNZPTav0PLYtKqTzWPzknqP2/8eM3tMvrGc0ePKiSZWj97md2wefVtWMXp83iQX wBfFZZOSmpNZllqkb5fAlXG0dS1bwSbeir0dvYwNjDO4uxg5OSQETCQ2XJvODGGLSVy4t56t i5GLQ0hgKaPE//U72CGcPiaJBR+/sIBUsQkYSnS97WIDsUUE8iVe7P0LFmcWeMMicW+TIYgt LBAqsWrOLFYQm0VAVeLrwUagDRwcvAIeEn9emUMsk5P4/3IFE4jNCRSe3PYE7AghAXeJj99O MU1g5F3AyLCKUTS1NLmgOCk911CvODG3uDQvXS85P3cTIyQ+vuxgXHzM6hCjAAejEg9vxj/x ECHWxLLiytxDjBIczEoivBqKEiFCvCmJlVWpRfnxRaU5qcWHGJk4OKUaGM32pTtND6+ae95O dtOiEIOJTwqdJp/fbdH8wDFUN4L9zUTjzy+O/ttq3Rw+Qdjw/oSC+OUzTEttPx5emNFqV8R7 3P2E4I98jdTvVqLFT762Jq7Uk47cIadgVdC68g7n3Qq36oUsnsy5s52iVu6c+XWtfWZR3hUe 4z23MvtOfv/kF7l5s8dtbyWW4oxEQy3mouJEALSYyk5tAgAA 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=neutral (google.com: patch+caf_=patchwork-forward=linaro.org@linaro.org does not designate permitted sender hosts) 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 b271348a4ec1..1b3f00726cd4 100644 --- a/drivers/iommu/exynos-iommu.c +++ b/drivers/iommu/exynos-iommu.c @@ -1055,32 +1055,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, @@ -1089,8 +1063,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, };