From patchwork Tue Mar 5 23:40:11 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Scott Jiang X-Patchwork-Id: 2218561 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork1.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork1.kernel.org (Postfix) with ESMTP id 4895C3FCF6 for ; Tue, 5 Mar 2013 10:38:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755598Ab3CEKih (ORCPT ); Tue, 5 Mar 2013 05:38:37 -0500 Received: from co1ehsobe006.messaging.microsoft.com ([216.32.180.189]:15308 "EHLO co1outboundpool.messaging.microsoft.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755419Ab3CEKig (ORCPT ); Tue, 5 Mar 2013 05:38:36 -0500 Received: from mail27-co1-R.bigfish.com (10.243.78.226) by CO1EHSOBE012.bigfish.com (10.243.66.75) with Microsoft SMTP Server id 14.1.225.23; Tue, 5 Mar 2013 10:38:35 +0000 Received: from mail27-co1 (localhost [127.0.0.1]) by mail27-co1-R.bigfish.com (Postfix) with ESMTP id 938718E012D; Tue, 5 Mar 2013 10:38:35 +0000 (UTC) X-Forefront-Antispam-Report: CIP:137.71.25.57; KIP:(null); UIP:(null); IPV:NLI; H:nwd2mta2.analog.com; RD:nwd2mail11.analog.com; EFVD:NLI X-SpamScore: 12 X-BigFish: VS12(zzzz1f42h1ee6h1ce5h1202h1e76h1d1ah1cabh1d2ahzz8275bhz2ei87h2a8h668h839hd24he5bh1288h12a5h12a9h12bdh12e5h1354h137ah139eh13b6h13eah1441h1504h1537h15a8h162dh1631h1758h17eeh1898h18e1h1946h19b5h1b0ahff4m1355m129fi1155h) Received-SPF: neutral (mail27-co1: 137.71.25.57 is neither permitted nor denied by domain of gmail.com) client-ip=137.71.25.57; envelope-from=scott.jiang.linux@gmail.com; helo=nwd2mta2.analog.com ; 2.analog.com ; X-FB-DOMAIN-IP-MATCH: fail Received: from mail27-co1 (localhost.localdomain [127.0.0.1]) by mail27-co1 (MessageSwitch) id 1362479914159812_26410; Tue, 5 Mar 2013 10:38:34 +0000 (UTC) Received: from CO1EHSMHS027.bigfish.com (unknown [10.243.78.235]) by mail27-co1.bigfish.com (Postfix) with ESMTP id 22D5D8401B8; Tue, 5 Mar 2013 10:38:34 +0000 (UTC) Received: from nwd2mta2.analog.com (137.71.25.57) by CO1EHSMHS027.bigfish.com (10.243.66.37) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 5 Mar 2013 10:38:33 +0000 Received: from NWD2HUBCAS6.ad.analog.com (nwd2hubcas6.ad.analog.com [10.64.72.159]) by nwd2mta2.analog.com (8.13.8/8.13.8) with ESMTP id r25Bwmgm030695 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Tue, 5 Mar 2013 06:58:48 -0500 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS6.ad.analog.com (10.64.72.159) with Microsoft SMTP Server id 14.2.328.9; Tue, 5 Mar 2013 05:38:32 -0500 Received: from linux.site ([10.99.22.20]) by zeus.spd.analog.com (8.14.5/8.14.5) with ESMTP id r25AcUZE031137; Tue, 5 Mar 2013 05:38:31 -0500 Received: from localhost.localdomain (unknown [10.99.24.72]) by linux.site (Postfix) with ESMTP id 015164288902; Mon, 4 Mar 2013 20:10:21 -0700 (MST) From: Scott Jiang To: Marek Szyprowski , CC: Scott Jiang Subject: [PATCH] [media] dma-mapping: enable no mmu support in dma_common_mmap Date: Tue, 5 Mar 2013 18:40:11 -0500 Message-ID: <1362526811-15768-1-git-send-email-scott.jiang.linux@gmail.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org No MMU systems also make use of this function to do mmap. Signed-off-by: Scott Jiang --- drivers/base/dma-mapping.c | 2 -- 1 files changed, 0 insertions(+), 2 deletions(-) diff --git a/drivers/base/dma-mapping.c b/drivers/base/dma-mapping.c index 0ce39a3..ae655b2 100644 --- a/drivers/base/dma-mapping.c +++ b/drivers/base/dma-mapping.c @@ -245,7 +245,6 @@ int dma_common_mmap(struct device *dev, struct vm_area_struct *vma, void *cpu_addr, dma_addr_t dma_addr, size_t size) { int ret = -ENXIO; -#ifdef CONFIG_MMU unsigned long user_count = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; unsigned long count = PAGE_ALIGN(size) >> PAGE_SHIFT; unsigned long pfn = page_to_pfn(virt_to_page(cpu_addr)); @@ -262,7 +261,6 @@ int dma_common_mmap(struct device *dev, struct vm_area_struct *vma, user_count << PAGE_SHIFT, vma->vm_page_prot); } -#endif /* CONFIG_MMU */ return ret; }