From patchwork Wed Mar 8 14:12:47 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 9611255 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 55AAC6046A for ; Wed, 8 Mar 2017 14:15:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9EAE52853E for ; Wed, 8 Mar 2017 14:15:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9233128552; Wed, 8 Mar 2017 14:15:07 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable 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 421842853E for ; Wed, 8 Mar 2017 14:15:07 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D43736E991; Wed, 8 Mar 2017 14:13:25 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wr0-x242.google.com (mail-wr0-x242.google.com [IPv6:2a00:1450:400c:c0c::242]) by gabe.freedesktop.org (Postfix) with ESMTPS id AD0846E95D for ; Wed, 8 Mar 2017 14:13:19 +0000 (UTC) Received: by mail-wr0-x242.google.com with SMTP id u108so4305898wrb.2 for ; Wed, 08 Mar 2017 06:13:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=AcelZeOXdjlHx1vtcEjROF/Guzk3fsUXKOI9cCZLuys=; b=ect/GVUXlhWmYoajHmNiZWh/6ofWPnkeOi9IlRkwmH5461HGsq3bbEal58e6KVwFa4 MyoIqegjrHa0vdxHsRidTZ4zgAF1azjM/AYhh8TewsJE3l0s8sufVSn7fZzoSnQuie7e v4/kJWoQXdIuaDnpEcLAx4VmHYj21cOMc8qOE= 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=AcelZeOXdjlHx1vtcEjROF/Guzk3fsUXKOI9cCZLuys=; b=R2/cXm2xQgkpReXHAJRtbag11QdsWtNj2IJbM++nJrD8Q7/T4XnYvziuq5pNZTkjsG HUO0eJhwDHDcu9G1+ou56S6aW162EP3RqYqp//QENsFx4Qqj07QCi8K0n0hBEzLYzToU g2rHmgKl+N2qoepj9E2MibOBdQ9DbeXa1jbNhc3Bnb1Lx/KHSp+Fadfnok0JD07NSMbD PCMGsImL2qaVkrxaRjSzjxBt/Tskp0q+5abaiAhS+HzfGf48MJcm7gjV+emKXQXnDTEF +l9ubDViHIidfk93lXnKW9BwJUGn0FoXp6OccQ7v+LD5TmQ+uKy4gizJqXEjluNL41xC MCgQ== X-Gm-Message-State: AMke39kaj8oShB5BDC3JexwxX7lXi7KvB5aW+A3DQ1prmcU70JyZK1FWF8pinMctCoe6tg== X-Received: by 10.223.152.215 with SMTP id w81mr6145117wrb.151.1488982398334; Wed, 08 Mar 2017 06:13:18 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:56c9:0:decc:6e78:7e96:b452]) by smtp.gmail.com with ESMTPSA id m186sm17012515wmd.21.2017.03.08.06.13.17 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 08 Mar 2017 06:13:17 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 14/24] drm/nouveau: Merge pre/postclose hooks Date: Wed, 8 Mar 2017 15:12:47 +0100 Message-Id: <20170308141257.12119-15-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170308141257.12119-1-daniel.vetter@ffwll.ch> References: <20170308141257.12119-1-daniel.vetter@ffwll.ch> Cc: Daniel Vetter , Daniel Vetter , Intel Graphics Development , Ben Skeggs , nouveau@lists.freedesktop.org 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: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Again no apparent explanation for the split except hysterical raisins. Merging them also makes it a bit more obviuos what's going on wrt the runtime pm refdancing. Cc: Ben Skeggs Cc: nouveau@lists.freedesktop.org Signed-off-by: Daniel Vetter Reviewed-by: Sean Paul --- drivers/gpu/drm/nouveau/nouveau_drm.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/drivers/gpu/drm/nouveau/nouveau_drm.c b/drivers/gpu/drm/nouveau/nouveau_drm.c index f0bb7606eb8b..0e26be017de7 100644 --- a/drivers/gpu/drm/nouveau/nouveau_drm.c +++ b/drivers/gpu/drm/nouveau/nouveau_drm.c @@ -881,7 +881,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv) } static void -nouveau_drm_preclose(struct drm_device *dev, struct drm_file *fpriv) +nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv) { struct nouveau_cli *cli = nouveau_cli(fpriv); struct nouveau_drm *drm = nouveau_drm(dev); @@ -897,12 +897,6 @@ nouveau_drm_preclose(struct drm_device *dev, struct drm_file *fpriv) list_del(&cli->head); mutex_unlock(&drm->client.mutex); -} - -static void -nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv) -{ - struct nouveau_cli *cli = nouveau_cli(fpriv); nouveau_cli_fini(cli); kfree(cli); pm_runtime_mark_last_busy(dev->dev); @@ -974,7 +968,6 @@ driver_stub = { .load = nouveau_drm_load, .unload = nouveau_drm_unload, .open = nouveau_drm_open, - .preclose = nouveau_drm_preclose, .postclose = nouveau_drm_postclose, .lastclose = nouveau_vga_lastclose,