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: 9631945 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 0961F60132 for ; Sat, 18 Mar 2017 01:57:13 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DB6E62832B for ; Sat, 18 Mar 2017 01:57:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BCB64284E9; Sat, 18 Mar 2017 01:57:12 +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=-6.4 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 345AF2832B for ; Sat, 18 Mar 2017 01:57:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751087AbdCRB5F (ORCPT ); Fri, 17 Mar 2017 21:57:05 -0400 Received: from mail-qt0-f180.google.com ([209.85.216.180]:32992 "EHLO mail-qt0-f180.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751037AbdCRB5F (ORCPT ); Fri, 17 Mar 2017 21:57:05 -0400 Received: by mail-qt0-f180.google.com with SMTP id i34so75896416qtc.0 for ; Fri, 17 Mar 2017 18:56:46 -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=rVp3iZ0QBseDuT4pBHUZmT00GZUREWdQGV5iL3B046FntZOj2dW+sDT7oCWg4iouHP Su0I+I4AltwHNW8Nhx6/c08/Phj0qxcR9991hknuKALP8D2LhdxyK7dCF+CXR0Kt9kUG YmRnVCg4RL99YRLv3OcZtBmASjW5ixOI/nbzUi9z9jMA2WqJSfIPTjnFPgjz9tfdBRhB vz4AuFXAIaNS7fSFwyZC3SHSRWg0TYVNMry34miOF8dUsBIqkosX3NsL0mMIKNuQivXJ 1egzau452/ujq2M/ps5RiQu7AlzcBV3vWWdlqnQ4LWBSDW392xfOsSJ2FC1mX5Oc4jcj ux7A== X-Gm-Message-State: AFeK/H3b9FJYKWpEmE22Cbg/dBT53rkES3rF6wQlbKmCmMRriuf3I6J6DD4VC5HCV6QSBd9p 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 Cc: Laura Abbott , romlem@google.com, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, linaro-mm-sig@lists.linaro.org, Greg Kroah-Hartman , linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, Brian Starkey , Daniel Vetter , Mark Brown , Benjamin Gaignard , linux-mm@kvack.org, Laurent Pinchart 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> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.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)