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: 17112 Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from ) id 1UCpGa-0002F4-1I; Tue, 05 Mar 2013 11:38:40 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-4) with esmtp id 1UCpGZ-0003EO-AR; Tue, 05 Mar 2013 11:38:39 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755598Ab3CEKih (ORCPT + 1 other); 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 X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2013.3.5.102715 X-PMX-Spam: Gauge=XIIIII, Probability=15%, Report=' DATE_IN_FUTURE_06_12 1.3, FORGED_FROM_GMAIL 0.1, HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1100_1199 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, DATE_TZ_NA 0, URI_ENDS_IN_HTML 0, __ANY_URI 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __FRAUD_BODY_WEBMAIL 0, __FRAUD_WEBMAIL 0, __FRAUD_WEBMAIL_FROM 0, __FROM_GMAIL 0, __HAS_FROM 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __PHISH_SPEAR_STRUCTURE_1 0, __SANE_MSGID 0, __TO_MALFORMED_2 0, __URI_NO_WWW 0, __URI_NS ' 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; }