From patchwork Sat Mar 18 00:54:51 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laura Abbott X-Patchwork-Id: 9631853 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 CC74560249 for ; Sat, 18 Mar 2017 00:58:50 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BF39D2841F for ; Sat, 18 Mar 2017 00:58:50 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B2328284A5; Sat, 18 Mar 2017 00:58:50 +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=-1.4 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_SORBS_SPAM autolearn=no version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3F5E82841F for ; Sat, 18 Mar 2017 00:58:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=XMIzDechnMgwwUBizwo6YmayAABTzuoAo631vPj4QIo=; b=r0vFUYeWBlViykbqlQU0yAvKuZ t/r/XORw7TeJ+ZJ4qA6xFqCZqxYk5pkiRVDvuVk/Vier2mvHUjmgRQDFh5RMWOQpDgsBIe82Nde0b bgO6ZIcpWTaj3IoImpUTPwtFY5PiEeZr+JZCpYcHrbgkzyk0pPd1/Kn4J8oJqhuYusFl+f05EbvP+ +S06TchytSIbX7y3bq5svMN9R6lF5SSWtieXEA8/KQg0N694JQ0je/Tg7eG1dySoDcWjgpKV6SnsR gMuIgm+Vnlh8aqC8X8D/v91ePANNFagVJO5atDNHnGrnZHGOGaX0Z69+/IUTBGZI5ks/cQyELvoy3 uYSMhFrg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cp2hl-00073q-Mr; Sat, 18 Mar 2017 00:58:49 +0000 Received: from mail-qt0-f179.google.com ([209.85.216.179]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cp2fQ-0004CY-6K for linux-arm-kernel@lists.infradead.org; Sat, 18 Mar 2017 00:56:34 +0000 Received: by mail-qt0-f179.google.com with SMTP id x35so75115973qtc.2 for ; Fri, 17 Mar 2017 17:56:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=uh8Xa/nqtA3fJXGA2BkO9n4aJSycnjJynNnbu0nftjw=; b=X8bKI0nhqk8guGYBF8+3CjsPW5vA9VpHUA9OA5zgDY6fAkJkLEQJkStfT6KHmmBeq1 C/5/5miGFzON/R0QXAEsURFu57NC2CM3GhG2JEfTO7NeTt6btWeBiG0oqn6Hk5bWkECO ttgquPbP+gVlSLAr8cjYsKoFnCits/gSOTXm6npxNfcfsWgoG4fuRcW8hz6c05uoIXti XfyVXvA+9OZ59wZhjilc4YPATS5qruxi/0ZYDN9WAduECAG58EtuGmxaEFQnWtaL+dFS 9PwXeD8vbISnkZJpQPcFitoOLa2tXxZmOimK8M2+exOCA1uFSb8tItWhWIGhWcwsKRpv mVlw== X-Gm-Message-State: AFeK/H1sZID7hc1AGalSd5CHNz4Ln7oOi5oHHzyMIWFN0JqRKXA07ugGcH+M3a5mx4OlA2e5 X-Received: by 10.237.34.212 with SMTP id q20mr16545197qtc.5.1489798562964; Fri, 17 Mar 2017 17:56:02 -0700 (PDT) Received: from labbott-redhat-machine.redhat.com ([2601:602:9802:a8dc:1722:8a6b:a66c:79eb]) by smtp.gmail.com with ESMTPSA id e55sm7118568qte.52.2017.03.17.17.55.59 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 17 Mar 2017 17:56:02 -0700 (PDT) From: Laura Abbott To: Sumit Semwal , Riley Andrews , arve@android.com Subject: [RFC PATCHv2 19/21] staging: android: ion: Drop ion_map_kernel interface Date: Fri, 17 Mar 2017 17:54:51 -0700 Message-Id: <1489798493-16600-20-git-send-email-labbott@redhat.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1489798493-16600-1-git-send-email-labbott@redhat.com> References: <1489798493-16600-1-git-send-email-labbott@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170317_175624_499365_070A5BBD X-CRM114-Status: UNSURE ( 9.81 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devel@driverdev.osuosl.org, romlem@google.com, Greg Kroah-Hartman , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-mm@kvack.org, Mark Brown , Laurent Pinchart , Benjamin Gaignard , Daniel Vetter , Laura Abbott , Brian Starkey , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org 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 Nobody uses this interface externally. Drop it. Signed-off-by: Laura Abbott --- drivers/staging/android/ion/ion.c | 59 --------------------------------------- 1 file changed, 59 deletions(-) diff --git a/drivers/staging/android/ion/ion.c b/drivers/staging/android/ion/ion.c index 7d40233..5a82bea 100644 --- a/drivers/staging/android/ion/ion.c +++ b/drivers/staging/android/ion/ion.c @@ -424,22 +424,6 @@ static void *ion_buffer_kmap_get(struct ion_buffer *buffer) return vaddr; } -static void *ion_handle_kmap_get(struct ion_handle *handle) -{ - struct ion_buffer *buffer = handle->buffer; - void *vaddr; - - if (handle->kmap_cnt) { - handle->kmap_cnt++; - return buffer->vaddr; - } - vaddr = ion_buffer_kmap_get(buffer); - if (IS_ERR(vaddr)) - return vaddr; - handle->kmap_cnt++; - return vaddr; -} - static void ion_buffer_kmap_put(struct ion_buffer *buffer) { buffer->kmap_cnt--; @@ -462,49 +446,6 @@ static void ion_handle_kmap_put(struct ion_handle *handle) ion_buffer_kmap_put(buffer); } -void *ion_map_kernel(struct ion_client *client, struct ion_handle *handle) -{ - struct ion_buffer *buffer; - void *vaddr; - - mutex_lock(&client->lock); - if (!ion_handle_validate(client, handle)) { - pr_err("%s: invalid handle passed to map_kernel.\n", - __func__); - mutex_unlock(&client->lock); - return ERR_PTR(-EINVAL); - } - - buffer = handle->buffer; - - if (!handle->buffer->heap->ops->map_kernel) { - pr_err("%s: map_kernel is not implemented by this heap.\n", - __func__); - mutex_unlock(&client->lock); - return ERR_PTR(-ENODEV); - } - - mutex_lock(&buffer->lock); - vaddr = ion_handle_kmap_get(handle); - mutex_unlock(&buffer->lock); - mutex_unlock(&client->lock); - return vaddr; -} -EXPORT_SYMBOL(ion_map_kernel); - -void ion_unmap_kernel(struct ion_client *client, struct ion_handle *handle) -{ - struct ion_buffer *buffer; - - mutex_lock(&client->lock); - buffer = handle->buffer; - mutex_lock(&buffer->lock); - ion_handle_kmap_put(handle); - mutex_unlock(&buffer->lock); - mutex_unlock(&client->lock); -} -EXPORT_SYMBOL(ion_unmap_kernel); - static struct mutex debugfs_mutex; static struct rb_root *ion_root_client; static int is_client_alive(struct ion_client *client)