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: 9189387 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 C76D060756 for ; Tue, 21 Jun 2016 04:37:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B48AD27F99 for ; Tue, 21 Jun 2016 04:37:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A933727F96; Tue, 21 Jun 2016 04:37:03 +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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 60B8E27F96 for ; Tue, 21 Jun 2016 04:37:03 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.85_2 #1 (Red Hat Linux)) id 1bFDPJ-0001Cv-IQ; Tue, 21 Jun 2016 04:35:25 +0000 Received: from mail-pa0-x230.google.com ([2607:f8b0:400e:c03::230]) by bombadil.infradead.org with esmtps (Exim 4.85_2 #1 (Red Hat Linux)) id 1bFDPA-0008OT-Kx for linux-arm-kernel@lists.infradead.org; Tue, 21 Jun 2016 04:35:17 +0000 Received: by mail-pa0-x230.google.com with SMTP id wo6so2176213pac.3 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=fXsliDAxr1xSq3Zb9+fsTVfKqTKfiTPeQdZYMXrgSSSHgKvCdVAN960cHHBkpAZjhJ s8fV1Mum2FnLLhbInVBGZ5BQR7YnlWTBUr4Sef95qfGuIpkfNdBQbOvJJDf9YjYM9b1Y VTq/KqhgKWFEx6adWmFvcAm13FPJU3VwUQltkq/UHGVB6EFvz5UnV9UpgQ+JmFdqVfLK HbJ4i7BUb22MprvupQzeXuYBdt4gjGo24+AJVxkEbk1KcuscgfZUeKsh1DrAYmE7ADPX KXp2VgwGBWPivj5N74L346hki8b1Z8voytD8O9gkVw2AERXKJtTn3bfNcYODibiyxLdh D0ng== X-Gm-Message-State: ALyK8tIq5xU53Lqv+BFhaE93IG86fZpoYESY9erMlOF+zvtfUtSGPvu4B6pQJ6//YBkgBjTT 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160620_213516_788607_B0557D84 X-CRM114-Status: GOOD ( 14.91 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Stuebner , David Airlie , Joerg Roedel , linux-kernel@vger.kernel.org, Daniel Kurtz , Tomasz Figa , linux-rockchip@lists.infradead.org, Simon Xue , Marek Szyprowski , Shunqian Zheng , linux-arm-kernel@lists.infradead.org, Mark Yao MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org 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;