Received: by 2002:ac0:8c9a:0:0:0:0:0 with SMTP id r26csp147063ima; Fri, 1 Feb 2019 00:52:13 -0800 (PST) X-Google-Smtp-Source: AHgI3IZ2Uy7jyHMXtofBQAYz+7vtw9NQ75Vkb/Duu+t4vXDx6f8vUbJ4NHXQlzDT2XVA1Msf5SVQ X-Received: by 2002:a63:5518:: with SMTP id j24mr1377895pgb.208.1549011133648; Fri, 01 Feb 2019 00:52:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1549011133; cv=none; d=google.com; s=arc-20160816; b=hOn834LzSqZLk6h82JDP46aDmEK3sHCF5IheonggzMvkf+YZS+tQ9Ndd4M++Z+Y4oG +77d5/lQznBwoDd9ZqDHSqlVJxZSowdi42e4wQlvGJQoHMfPFBG7G1zAUbTf9940aEFm hw8p5O89IeFNAQuUSepep85kXwE7WXOWUFraYxgnyhCpb/TlGQH61coup4+dkzpJHzX2 6x1uqjLGWId6zfJR00P8qLT39C7RZiMyfUAttXXw2aXjVo0uyPnOE0U4QvBo7ljKZD6E zYFj545ICOa5tY86eyRiv/9cdi1VVefdIqXzmbjMt/rmozMtQrWmjwP3TfLk4neI89mZ Kv8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=it7hgDmLzWc1k/Yz2n7HKXPwU9eNC/NoGZJD3EXx09o=; b=B+nxeffAD2PZYT6s8kQ9LwW6kIqn9pVby5SGSSIb6Ua71b20nzO0qeLF5+1+B05rxz 5M6Otdt0sios7MOJ8PltXm60l9ZLbyo3RCcyKMSUePHnK8cIKV6sreG7d73L4jjXn1Ys XjVm4M7CUHkzG1OywwaSptmNRiyEVWkPxvo4ULAcxm5CM9msBTR9SssCAXYRayrFwCiL 3Ik4EKY5YJ1HStWIsGT329gvHMXnLSh6jVO/nhwwkydVXXOMktUnR3si8jA6j4sLO6Gt N3CEPffov1oUZXbc4nRXNJNMli9fb1BXxO0/Ta7FBxaamYPAi2ueIPdOxzWrZKoYhNzh bQ9A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="I/04jqni"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 126si6845290pff.77.2019.02.01.00.51.58; Fri, 01 Feb 2019 00:52:13 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b="I/04jqni"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729799AbfBAIsv (ORCPT + 99 others); Fri, 1 Feb 2019 03:48:51 -0500 Received: from bombadil.infradead.org ([198.137.202.133]:48596 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729773AbfBAIsr (ORCPT ); Fri, 1 Feb 2019 03:48:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From :Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=it7hgDmLzWc1k/Yz2n7HKXPwU9eNC/NoGZJD3EXx09o=; b=I/04jqniu/vhIQMDD+8JWURNDw QlxyZD+viw/vFPhVRvjZ379SnTKnbe9vSFvvQp04872xAVvrLXXQMX4FWVNM2xo6c0HQn8LfLTeNF xZayuaNfqA5CgPy9RW/wmCo8scUvrucocBrt1DrwQD0rcLFRK7a3JWw2SIrExF1uhBGfuhTWwZM93 K3XMWpe7iTBeRaIvz4PZCEBRNTUDQRMPaEqEKkVZA9W0PTgWgwxo/jzQ0AxGcQFlbUtL5QslqyAG2 bpa8SW4zP6Jf3BbzUsR/EqZf4eoxS8HI6sBudOEX8lRWpAs6pM7BscZCnO5sHRfDv/0mL+lsUCLMm gjsxH36A==; Received: from 089144212163.atnat0021.highway.a1.net ([89.144.212.163] helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1gpUVA-0001Vl-SH; Fri, 01 Feb 2019 08:48:45 +0000 From: Christoph Hellwig To: John Crispin , Vinod Koul , Dmitry Tarnyagin , Nicolas Ferre , Sudip Mukherjee , Felipe Balbi , linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org, dmaengine@vger.kernel.org, netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-fbdev@vger.kernel.org, alsa-devel@alsa-project.org Cc: iommu@lists.linux-foundation.org Subject: [PATCH 16/18] pxa3xx-gcu: pass struct device to dma_mmap_coherent Date: Fri, 1 Feb 2019 09:47:59 +0100 Message-Id: <20190201084801.10983-17-hch@lst.de> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190201084801.10983-1-hch@lst.de> References: <20190201084801.10983-1-hch@lst.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Just like we do for all other DMA operations. Signed-off-by: Christoph Hellwig --- drivers/video/fbdev/pxa3xx-gcu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/video/fbdev/pxa3xx-gcu.c b/drivers/video/fbdev/pxa3xx-gcu.c index 69cfb337c857..047a2fa4b87e 100644 --- a/drivers/video/fbdev/pxa3xx-gcu.c +++ b/drivers/video/fbdev/pxa3xx-gcu.c @@ -96,6 +96,7 @@ struct pxa3xx_gcu_batch { }; struct pxa3xx_gcu_priv { + struct device *dev; void __iomem *mmio_base; struct clk *clk; struct pxa3xx_gcu_shared *shared; @@ -493,7 +494,7 @@ pxa3xx_gcu_mmap(struct file *file, struct vm_area_struct *vma) if (size != SHARED_SIZE) return -EINVAL; - return dma_mmap_coherent(NULL, vma, + return dma_mmap_coherent(priv->dev, vma, priv->shared, priv->shared_phys, size); case SHARED_SIZE >> PAGE_SHIFT: @@ -670,6 +671,7 @@ static int pxa3xx_gcu_probe(struct platform_device *pdev) platform_set_drvdata(pdev, priv); priv->resource_mem = r; + priv->dev = dev; pxa3xx_gcu_reset(priv); pxa3xx_gcu_init_debug_timer(priv); -- 2.20.1