From patchwork Mon Apr 3 18:58:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laura Abbott X-Patchwork-Id: 9660367 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 677EB6032D for ; Mon, 3 Apr 2017 19:01:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A0F6284C2 for ; Mon, 3 Apr 2017 19:01:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4A216284F5; Mon, 3 Apr 2017 19:01:23 +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.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI 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 052D0284C2 for ; Mon, 3 Apr 2017 19:01:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753147AbdDCTAZ (ORCPT ); Mon, 3 Apr 2017 15:00:25 -0400 Received: from mail-qk0-f175.google.com ([209.85.220.175]:34990 "EHLO mail-qk0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752881AbdDCS7T (ORCPT ); Mon, 3 Apr 2017 14:59:19 -0400 Received: by mail-qk0-f175.google.com with SMTP id g195so50942741qke.2 for ; Mon, 03 Apr 2017 11:59:19 -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=HXSiAwp0Rbjy9NDF4Eb1zW8VUY110QvyVq9YO2ccF/c=; b=YYKTgJEFPrPE6P8An1SyQ66hXzZzNu4eJqNRxzdJ+we45L9AVGN/LRIQq+Aspux5Zy CSRtVexBfPjWk3Vq74/BnHUkWwLJOiW4OLSINmldqhd9fu2TfuyV6bZqEUE1HFl1DOWw 3t+ZJJqW3kkCQ0qs/T4HTlo8ShJfPvf9g0pqbZ6YR6CssAF1D72MADwsjXmzkyVZ/zXM pZxdou/8QopaPO0FitEY8QgkUV59EulOrG6PBZDoNyb2H7LeeFRYiQMVAEcnDqBPTu26 CtD575tIfPEjkGJ3jFoKeSoD/ix8e9JIw0FSnx4+Asi8YpYC9jTkLIXogIrZwN2ahZ1J jOMg== X-Gm-Message-State: AFeK/H1tf4cS5z8GW5poFeQ+mvsEurA5ZmbJYAZRrGyuAudYg6oKWT+oSPQTeWX9J/zTz3S4 X-Received: by 10.55.215.25 with SMTP id m25mr16598274qki.34.1491245953735; Mon, 03 Apr 2017 11:59:13 -0700 (PDT) Received: from labbott-redhat-machine.redhat.com ([2601:602:9802:a8dc:1722:8a6b:a66c:79eb]) by smtp.gmail.com with ESMTPSA id e5sm10173689qtc.6.2017.04.03.11.59.10 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Apr 2017 11:59:12 -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: [PATCHv3 19/22] staging: android: ion: Drop ion_map_kernel interface Date: Mon, 3 Apr 2017 11:58:01 -0700 Message-Id: <1491245884-15852-20-git-send-email-labbott@redhat.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1491245884-15852-1-git-send-email-labbott@redhat.com> References: <1491245884-15852-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)