From patchwork Sun Jul 23 19:16:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Noralf_Tr=C3=B8nnes?= X-Patchwork-Id: 9858623 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 5A86E60380 for ; Sun, 23 Jul 2017 19:32:41 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 495B3280FC for ; Sun, 23 Jul 2017 19:32:41 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3E1252847A; Sun, 23 Jul 2017 19:32:41 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id A900E280FC for ; Sun, 23 Jul 2017 19:32:40 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id C2A116E1EC; Sun, 23 Jul 2017 19:32:39 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.domeneshop.no (smtp.domeneshop.no [IPv6:2a01:5b40:0:3005::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8A7216E1EC for ; Sun, 23 Jul 2017 19:32:38 +0000 (UTC) Received: from 211.81-166-168.customer.lyse.net ([81.166.168.211]:46846 helo=localhost.localdomain) by smtp.domeneshop.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA256:128) (Exim 4.84_2) (envelope-from ) id 1dZMP3-0002JZ-0y; Sun, 23 Jul 2017 21:18:57 +0200 From: =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= To: dri-devel@lists.freedesktop.org Subject: [PATCH 41/41] drm/virtio: Use the drm_driver.dumb_destroy default Date: Sun, 23 Jul 2017 21:16:57 +0200 Message-Id: <1500837417-40580-42-git-send-email-noralf@tronnes.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1500837417-40580-1-git-send-email-noralf@tronnes.org> References: <1500837417-40580-1-git-send-email-noralf@tronnes.org> MIME-Version: 1.0 Cc: narmstrong@baylibre.com, liviu.dudau@arm.com, linux@armlinux.org.uk, thierry.reding@gmail.com, laurent.pinchart@ideasonboard.com, daniel.vetter@intel.com, marex@denx.de, boris.brezillon@free-electrons.com, abrodkin@synopsys.com, z.liuxinliang@hisilicon.com, kong.kongxinwei@hisilicon.com, tomi.valkeinen@ti.com, bskeggs@redhat.com, airlied@redhat.com, puck.chen@hisilicon.com, zourongrong@gmail.com, jsarha@ti.com, vincent.abriou@st.com, alison.wang@freescale.com, sw0312.kim@samsung.com, philippe.cornu@st.com, yannick.fertre@st.com, kyungmin.park@samsung.com, alexander.deucher@amd.com, maxime.ripard@free-electrons.com, shawnguo@kernel.org, christian.koenig@amd.com, kraxel@redhat.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP virtio_gpu_mode_dumb_destroy() is the same as drm_gem_dumb_destroy() which is the drm_driver.dumb_destroy default, so no need to set it. Cc: David Airlie Cc: Gerd Hoffmann Signed-off-by: Noralf Trønnes --- drivers/gpu/drm/virtio/virtgpu_drv.c | 1 - drivers/gpu/drm/virtio/virtgpu_drv.h | 3 --- drivers/gpu/drm/virtio/virtgpu_gem.c | 7 ------- 3 files changed, 11 deletions(-) diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.c b/drivers/gpu/drm/virtio/virtgpu_drv.c index 63d35c7..49a3d8d 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.c +++ b/drivers/gpu/drm/virtio/virtgpu_drv.c @@ -122,7 +122,6 @@ static struct drm_driver driver = { .dumb_create = virtio_gpu_mode_dumb_create, .dumb_map_offset = virtio_gpu_mode_dumb_mmap, - .dumb_destroy = virtio_gpu_mode_dumb_destroy, #if defined(CONFIG_DEBUG_FS) .debugfs_init = virtio_gpu_debugfs_init, diff --git a/drivers/gpu/drm/virtio/virtgpu_drv.h b/drivers/gpu/drm/virtio/virtgpu_drv.h index 3a66abb..da2fb58 100644 --- a/drivers/gpu/drm/virtio/virtgpu_drv.h +++ b/drivers/gpu/drm/virtio/virtgpu_drv.h @@ -236,9 +236,6 @@ struct virtio_gpu_object *virtio_gpu_alloc_object(struct drm_device *dev, int virtio_gpu_mode_dumb_create(struct drm_file *file_priv, struct drm_device *dev, struct drm_mode_create_dumb *args); -int virtio_gpu_mode_dumb_destroy(struct drm_file *file_priv, - struct drm_device *dev, - uint32_t handle); int virtio_gpu_mode_dumb_mmap(struct drm_file *file_priv, struct drm_device *dev, uint32_t handle, uint64_t *offset_p); diff --git a/drivers/gpu/drm/virtio/virtgpu_gem.c b/drivers/gpu/drm/virtio/virtgpu_gem.c index cc025d8..72ad7b1 100644 --- a/drivers/gpu/drm/virtio/virtgpu_gem.c +++ b/drivers/gpu/drm/virtio/virtgpu_gem.c @@ -118,13 +118,6 @@ int virtio_gpu_mode_dumb_create(struct drm_file *file_priv, return ret; } -int virtio_gpu_mode_dumb_destroy(struct drm_file *file_priv, - struct drm_device *dev, - uint32_t handle) -{ - return drm_gem_handle_delete(file_priv, handle); -} - int virtio_gpu_mode_dumb_mmap(struct drm_file *file_priv, struct drm_device *dev, uint32_t handle, uint64_t *offset_p)