From patchwork Tue Apr 18 18:27:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laura Abbott X-Patchwork-Id: 9686057 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 56E11601C2 for ; Tue, 18 Apr 2017 18:35:40 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4B9BB283E1 for ; Tue, 18 Apr 2017 18:35:40 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 40284283F1; Tue, 18 Apr 2017 18:35:40 +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.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable 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 DCFE5283E1 for ; Tue, 18 Apr 2017 18:35:39 +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=hjc8k9c+zru8AXlyng0tGk5R56KvrIZdOoxjRAqWOUw=; b=XJBDDfkN/r0KAxgjbnVmqPAipu zZVWXfu5U6ka+igzRMcUxyo7C7eF+5GwNdCBxopa2N+0PLNG6dSPdjMcIgaOzc7xuy5n8sFgSLRSi pCF40WSioMZH6tN2wxID4y2YUvbRYkjWh8K0A3SE4N9Coweo37HbskKJnP+yo1r662NpXWSPimqx2 DbutC+4nrsflyG/G/0EpEyM5MB2JYzJSPZ71HzR0kcRU9YHbDEk4oMDfuonMpg/wcdkYtQr1H57N/ mkl+WjCqtoQFSb+qQowQAI9y7Gqjw4m2Qsjg/PKEv3G5kxODTyMSX0TWb+kGuzX5sJ3Mq3Eg+83Sz XAJkLwPw==; 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 1d0XyN-0004rV-Po; Tue, 18 Apr 2017 18:35:31 +0000 Received: from mail-qt0-f177.google.com ([209.85.216.177]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1d0Xxd-0002qH-FD for linux-arm-kernel@lists.infradead.org; Tue, 18 Apr 2017 18:35:07 +0000 Received: by mail-qt0-f177.google.com with SMTP id c45so1304550qtb.1 for ; Tue, 18 Apr 2017 11:34:25 -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=B2hlK45mOJNDqFh+bDIvgCfryBnmKOJMJjrQ3IHFbEIeC8fpLVkD/kGWB7t6deqrLS bhBonGaLfUp52piWMg5u7ttUy9CT+9njKOIzYv6nqru/Je9rA/ZvyEsaj5lCIpOiJnxk R/t+OQ3CkKvZiNQdAt7rWpsENSAJXYzlECdvwnZtn+ZcM5sBLFzHHaH49u/WSzC1M0AG f1arngslIiRdDtgbjEqGHJq5tXMHdv0qbvxlmAPRGJz1NsB57slmWkvDAW8K3XTAM4tO LhyXjP4B9yUIP+nTpYvSL4QyYSIdrlD0n00IOcNGGyTJh7FwExw8W4Mn9PLhUGvfwXj8 JNVw== X-Gm-Message-State: AN3rC/5Melh+bC3fSaK+Mh3prwbK0lPEGbEspWQiifQ/0xLpZCBOW1q1 k5qUGZy2GTvDilJ2 X-Received: by 10.200.57.34 with SMTP id s31mr14802174qtb.281.1492540071665; Tue, 18 Apr 2017 11:27:51 -0700 (PDT) Received: from labbott-redhat-machine.redhat.com ([2601:602:9802:a8dc::159c]) by smtp.gmail.com with ESMTPSA id q66sm10142381qkd.69.2017.04.18.11.27.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 18 Apr 2017 11:27:50 -0700 (PDT) From: Laura Abbott To: Sumit Semwal , Riley Andrews , arve@android.com, Greg Kroah-Hartman Subject: [PATCHv4 09/12] staging: android: ion: Drop ion_map_kernel interface Date: Tue, 18 Apr 2017 11:27:11 -0700 Message-Id: <1492540034-5466-10-git-send-email-labbott@redhat.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1492540034-5466-1-git-send-email-labbott@redhat.com> References: <1492540034-5466-1-git-send-email-labbott@redhat.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170418_113446_206878_496F0448 X-CRM114-Status: GOOD ( 10.32 ) 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, 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)