From patchwork Thu Dec 8 11:07:38 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Vetter X-Patchwork-Id: 9466155 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 4C25A60231 for ; Thu, 8 Dec 2016 11:07:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4562F284D5 for ; Thu, 8 Dec 2016 11:07:57 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3A04E28536; Thu, 8 Dec 2016 11:07:57 +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=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 C322C284D5 for ; Thu, 8 Dec 2016 11:07:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1B0A76E737; Thu, 8 Dec 2016 11:07:45 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id D23EB6E064 for ; Thu, 8 Dec 2016 11:07:37 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id m203so2816790wma.3 for ; Thu, 08 Dec 2016 03:07:37 -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=R0GrW0FWV9Ge5vu81VnAng8sK+DCV1Sa3uRk7US01pA=; b=hv4q1+V+e1O7+DpkZa4K+2i0bemO+bxldpMk1/uUQ4Kltp10AMpHXDScdSfKnpEetF MBfoBVyn//f4DCf3+qn0f4SEFUZJw0UtVbmDx7diPJQ6VPaxJCy+w7N0eBTzsYzf/Nyk wNjZksNTyEcbe0AfeTI0ypRrb1RUB9GRtSAfI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=R0GrW0FWV9Ge5vu81VnAng8sK+DCV1Sa3uRk7US01pA=; b=KpdTdTDqW/60Ity5VJYCzUEkAVNgl3cN3I/UF0KpkJA78vRsbZW4g8O90Sszronz38 AMFrtznFe08JnRpUKm0JvcepeVWDyRH0Pe6DUo3heE3iaxYW7Ii+8djEzKHX4HVcxjRq T2qervCJl3LpfpyjjyH33dsx9w6bgd3aVxmtzpUNjZ2utO4+lf93jmS1ORBbLcpEK1Nl sZXyD8852XJXMW8L/1rBSp7YRARlIafybLeIVjGa4zEmCiFAsA1V4LZJxy7H8bGUD1wq 5sJbdYLjsYh0FjyAaeMmj2B3WIlQn2DmC1IN1TFQLGtRhQNX+xLhHiKPUieAkUv0EMTR idQw== X-Gm-Message-State: AKaTC01Iz3bdjWczocaHmjYeZFAUMfWsyFx4kKAAM2nZCtjRW5ZZzHn4BfAC/Mv0H6Yh1g== X-Received: by 10.28.55.203 with SMTP id e194mr1608537wma.6.1481195256289; Thu, 08 Dec 2016 03:07:36 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:56b5:0:ac27:b86c:7764:9429]) by smtp.gmail.com with ESMTPSA id yj10sm36462963wjb.3.2016.12.08.03.07.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Dec 2016 03:07:35 -0800 (PST) From: Daniel Vetter To: DRI Development Subject: [PATCH 3/4] drm/mediatek: don't use drm_put_dev Date: Thu, 8 Dec 2016 12:07:38 +0100 Message-Id: <20161208110739.24417-3-daniel.vetter@ffwll.ch> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161208110739.24417-1-daniel.vetter@ffwll.ch> References: <20161208110739.24417-1-daniel.vetter@ffwll.ch> Cc: Daniel Vetter , Daniel Vetter 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 fsl is already fully demidlayered in the probe function, but for convenience stuck with drm_put_dev. Call the unregister/unref parts separately, to make sure this driver works correct. Cc: Philipp Zabel Cc: CK Hu Signed-off-by: Daniel Vetter Reviewed-by: Lucas Stach --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index 4b7fe7eaec01..b5f88e6d078e 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -321,7 +321,8 @@ static void mtk_drm_unbind(struct device *dev) { struct mtk_drm_private *private = dev_get_drvdata(dev); - drm_put_dev(private->drm); + drm_dev_unregister(private->drm); + drm_dev_unref(private->drm); private->drm = NULL; }