From patchwork Tue Sep 9 15:45:45 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 4871391 Return-Path: X-Original-To: patchwork-linux-omap@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 2E50CC033A for ; Tue, 9 Sep 2014 15:46:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 02B0C20170 for ; Tue, 9 Sep 2014 15:46:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B0C6320149 for ; Tue, 9 Sep 2014 15:46:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757397AbaIIPp5 (ORCPT ); Tue, 9 Sep 2014 11:45:57 -0400 Received: from galahad.ideasonboard.com ([185.26.127.97]:33117 "EHLO galahad.ideasonboard.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757395AbaIIPp4 (ORCPT ); Tue, 9 Sep 2014 11:45:56 -0400 Received: from avalon.ideasonboard.com (dsl-hkibrasgw3-50ddcc-40.dhcp.inet.fi [80.221.204.40]) by galahad.ideasonboard.com (Postfix) with ESMTPSA id 2B95E20CB0; Tue, 9 Sep 2014 17:44:51 +0200 (CEST) From: Laurent Pinchart To: iommu@lists.linux-foundation.org Cc: linux-omap@vger.kernel.org, Suman Anna , Florian Vaussard , Joerg Roedel Subject: [PATCH 2/2] iommu/omap: Remove omap_iommu unused owner field Date: Tue, 9 Sep 2014 18:45:45 +0300 Message-Id: <1410277545-32157-3-git-send-email-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 1.8.5.5 In-Reply-To: <1410277545-32157-1-git-send-email-laurent.pinchart@ideasonboard.com> References: <1410277545-32157-1-git-send-email-laurent.pinchart@ideasonboard.com> Sender: linux-omap-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-omap@vger.kernel.org X-Spam-Status: No, score=-9.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The owner field is never set. Remove it. Signed-off-by: Laurent Pinchart Acked-by: Suman Anna --- drivers/iommu/omap-iommu.c | 11 ----------- drivers/iommu/omap-iommu.h | 1 - 2 files changed, 12 deletions(-) diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c index 192c367..fdfe732 100644 --- a/drivers/iommu/omap-iommu.c +++ b/drivers/iommu/omap-iommu.c @@ -861,20 +861,11 @@ static struct omap_iommu *omap_iommu_attach(const char *name, u32 *iopgd) goto err_enable; flush_iotlb_all(obj); - if (!try_module_get(obj->owner)) { - dev_err(obj->dev, "%s: can't get owner\n", __func__); - err = -ENODEV; - goto err_module; - } - spin_unlock(&obj->iommu_lock); dev_dbg(obj->dev, "%s: %s\n", __func__, obj->name); return obj; -err_module: - if (obj->refcount == 1) - iommu_disable(obj); err_enable: obj->refcount--; spin_unlock(&obj->iommu_lock); @@ -895,8 +886,6 @@ static void omap_iommu_detach(struct omap_iommu *obj) if (--obj->refcount == 0) iommu_disable(obj); - module_put(obj->owner); - obj->iopgd = NULL; spin_unlock(&obj->iommu_lock); diff --git a/drivers/iommu/omap-iommu.h b/drivers/iommu/omap-iommu.h index 7a90800..2c3b85c 100644 --- a/drivers/iommu/omap-iommu.h +++ b/drivers/iommu/omap-iommu.h @@ -28,7 +28,6 @@ struct iotlb_entry { struct omap_iommu { const char *name; - struct module *owner; void __iomem *regbase; struct device *dev; void *isr_priv;