From patchwork Tue Jun 21 04:34:34 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Figa X-Patchwork-Id: 9189341 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EB0B06075A for ; Tue, 21 Jun 2016 04:35:14 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D9A8C27F96 for ; Tue, 21 Jun 2016 04:35:14 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id CE82D27F9A; Tue, 21 Jun 2016 04:35:14 +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=-4.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7C4FC27F96 for ; Tue, 21 Jun 2016 04:35:14 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 931966E1EA; Tue, 21 Jun 2016 04:35:09 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pa0-x22a.google.com (mail-pa0-x22a.google.com [IPv6:2607:f8b0:400e:c03::22a]) by gabe.freedesktop.org (Postfix) with ESMTPS id A74B36E1EA for ; Tue, 21 Jun 2016 04:34:56 +0000 (UTC) Received: by mail-pa0-x22a.google.com with SMTP id bz2so2188514pad.1 for ; Mon, 20 Jun 2016 21:34:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ou5mq3oC3grq6h2PnGko1km68EZ8vDtXu8sHI3aJr7M=; b=ViCEkZ+7QXZtDmgwiYTpRkgTgPSuBRZCWBInD0yoVhsyj4MkDu4hAW4by60lWFcJ9I GUQQ6qUZ5wPW+L1WEvVdT2xzzOpKkSsjAZYYnduT0aOq2J0aGx5lNlJ+JYKBb6awMFUu WMRczs/HOuwgd17W4AGyYd7TavnTUTNXkeCsg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=ou5mq3oC3grq6h2PnGko1km68EZ8vDtXu8sHI3aJr7M=; b=WXi/PWnktW0bIJvJRzyZ3t1Vo5XI4QbnMiNhgTYX1tEROMaj9HI/++e3xbK8fpFQC8 37WaApMdjBz5mHGX0s57kQH6dr4warog4XUprh5juVTD5YBgqRBySNIx/fFE+8yOSRiz 99yFzdlVbxa6c++K2Lkbwd6GbkGAqs/mG/yaeGQqIFvP6pf7aTP9mQqoZ4qSkXKbNNfG 8KtZTWXC3bqGg2So2vM9O/Ep/CJqbW4hNL3L4ry0XPqzGR75WM5JUcPBiNeAHRkBB+fq 58Bs02aaujUylSj+WW1QUoTBK3yE+uMFacCmsTiLJWa6pwSTG02Jz1ud3l3S26GhDJlS QUVQ== X-Gm-Message-State: ALyK8tKIetbJ4X80DnN5BBHHR1+8ty8HlO18YYcZELvzXX/YWg93FoQdlqdFdN9urRL0owgJ X-Received: by 10.66.246.234 with SMTP id xz10mr25825895pac.24.1466483695714; Mon, 20 Jun 2016 21:34:55 -0700 (PDT) Received: from basement.tok.corp.google.com ([100.103.3.207]) by smtp.gmail.com with ESMTPSA id s3sm24500160pfb.87.2016.06.20.21.34.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 20 Jun 2016 21:34:55 -0700 (PDT) From: Tomasz Figa To: iommu@lists.linux-foundation.org, dri-devel@lists.freedesktop.org Subject: [PATCH v4 1/8] iommu/rockchip: Fix devm_{request, free}_irq parameter Date: Tue, 21 Jun 2016 13:34:34 +0900 Message-Id: <1466483681-36110-2-git-send-email-tfiga@chromium.org> X-Mailer: git-send-email 2.8.0.rc3.226.g39d4020 In-Reply-To: <1466483681-36110-1-git-send-email-tfiga@chromium.org> References: <1466483681-36110-1-git-send-email-tfiga@chromium.org> Cc: linux-kernel@vger.kernel.org, Tomasz Figa , linux-rockchip@lists.infradead.org, Simon Xue , Marek Szyprowski , Shunqian Zheng , linux-arm-kernel@lists.infradead.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Simon Xue Even though the IOMMU shares IRQ with its master, the struct device passed to {request,free}_irq is supposed to represent the device that is signalling the interrupt. This patch makes the driver use IOMMU device instead of master's device to make things clear. Signed-off-by: Simon Xue Signed-off-by: Shunqian Zheng Reviewed-on: https://chromium-review.googlesource.com/346325 Reviewed-by: Douglas Anderson Signed-off-by: Tomasz Figa --- drivers/iommu/rockchip-iommu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iommu/rockchip-iommu.c b/drivers/iommu/rockchip-iommu.c index 25b4627..5a9659a 100644 --- a/drivers/iommu/rockchip-iommu.c +++ b/drivers/iommu/rockchip-iommu.c @@ -807,7 +807,7 @@ static int rk_iommu_attach_device(struct iommu_domain *domain, iommu->domain = domain; - ret = devm_request_irq(dev, iommu->irq, rk_iommu_irq, + ret = devm_request_irq(iommu->dev, iommu->irq, rk_iommu_irq, IRQF_SHARED, dev_name(dev), iommu); if (ret) return ret; @@ -860,7 +860,7 @@ static void rk_iommu_detach_device(struct iommu_domain *domain, } rk_iommu_disable_stall(iommu); - devm_free_irq(dev, iommu->irq, iommu); + devm_free_irq(iommu->dev, iommu->irq, iommu); iommu->domain = NULL;