From patchwork Thu Aug 3 11:58:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cihangir Akturk X-Patchwork-Id: 9878849 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 B7A9D60311 for ; Thu, 3 Aug 2017 12:02:23 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AEDE2288C7 for ; Thu, 3 Aug 2017 12:02:23 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A3639288C6; Thu, 3 Aug 2017 12:02: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=-1.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE autolearn=ham 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 24332288BC for ; Thu, 3 Aug 2017 12:02:22 +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=OFdpvNWQ3AnTdfNiliHQca8UIFVsWNEiuvv0UufpYLA=; b=S5kHmxesiel67o27P/o8zP/jEK rZqu5Wo279HXKkQUqdHYfM5ic6H4IGV7fa2BnKnM63sHqK9WPnLLOvXr+UwCT0LImLfYl/nnEMlUn ecmvepMrxGeK0tKl58oJPmM1RCAv/rkAy+INvl/7wYqgkHAVu4XHqq+dAOkKiuQ/5/x4UwAj0S3f9 HH64vDvRnHQx70cD2cWaxgkMD7PcLn0obXEPj2JaeAdtihFAWlBXdQxtJPtsr5sWPGhX2OjP08xDG FVtA4HBvRldNXOcM4zew7NqFYwRTJ5eqXoOCX7nB7UG/ul2zX6Nxpy6dMX4MRbdS1iSI5nzSy9UVn YcUr13uQ==; 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 1ddEpZ-0006LV-SY; Thu, 03 Aug 2017 12:02:21 +0000 Received: from mail-wm0-x244.google.com ([2a00:1450:400c:c09::244]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1ddEp9-0005kJ-20; Thu, 03 Aug 2017 12:02:02 +0000 Received: by mail-wm0-x244.google.com with SMTP id d40so1908704wma.3; Thu, 03 Aug 2017 05:01:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=JgRa+Eb6nOv8ziUT0PVnnTYf75h+f+pE4Ua8gzGRAyU=; b=eXo0Ty5TQA6ofkDMJ+SCF6HP0yNFy3XoNQTmrpTly3rGouxJV2hYrRnEipZcZuEdkT LzLAYOGc5hjGLNuE+53AWfE1JxKsCzseEVdzPJo6jAEB9KOGvax2O7FIcKihhgtEkKST 0eJkwAqUFY8ZsHA6P8f+xo4ccMeTMF+CxiyVMbXfpglPN1ZmWW+udG9pho1cpBCplMnn baqSsTxnpQvMh9WuN+XiJSU1fnQKQ9SzvfY0d6RW5AEYmbM7GqyHtRvzbjLTVqAHLS/P 81MFM5d5Sia515yJpIvn3TQf9cytksw74e0ODoScSdvcUCCUtPM5T3ti4WHt7O5e4dQi GeQQ== 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=JgRa+Eb6nOv8ziUT0PVnnTYf75h+f+pE4Ua8gzGRAyU=; b=AjIsgH9ut1wr3ToNh19AZqcs/uZWNUlVfiHnGGp2SDG9SahfYbp3a3Ockr1WiADKXg xUk5Jx3qf2tSLFY7MZluN+4GFWo/nQl4onIqCl0wNMI/BkUbxqdRKACuJrAeOWoJqP6d JsNWrQtKbQGMUYUOtGiEQLhUsZ6XiUZZ7fpwhBCFfnmDB77dgXdbPueXy9zWfHxu9jTl 7myWuam/EYoWR/At6mcapFZEgpA+Gh9cAUzT8tHKPyTX8JmTKcnS65frmhkQoFKrlJTD Ap8IWbSfUMQbsJGG998ow6uUlXp62bkjjz6UDZyNjMMhPjSibXTmpdh+Kx6BIEsR+Ei5 hv8Q== X-Gm-Message-State: AHYfb5hogNN3+T6+kFjnFeHkijjjYAwneeGLuvVNvoFSBoKnzD+PFlOB DMmwexdgtWt4kA== X-Received: by 10.28.168.84 with SMTP id r81mr1070029wme.148.1501761698225; Thu, 03 Aug 2017 05:01:38 -0700 (PDT) Received: from localhost.localdomain ([161.9.194.184]) by smtp.gmail.com with ESMTPSA id c141sm1402474wmd.44.2017.08.03.05.01.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 03 Aug 2017 05:01:37 -0700 (PDT) From: Cihangir Akturk To: Subject: [PATCH 14/29] drm/mediatek: switch to drm_*{get,put} helpers Date: Thu, 3 Aug 2017 14:58:29 +0300 Message-Id: <1501761585-11757-15-git-send-email-cakturk@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1501761585-11757-1-git-send-email-cakturk@gmail.com> References: <1501761585-11757-1-git-send-email-cakturk@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170803_050156_390410_F2202159 X-CRM114-Status: GOOD ( 11.21 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Cihangir Akturk , Matthias Brugger , Philipp Zabel , CK Hu , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP drm_*_reference() and drm_*_unreference() functions are just compatibility alias for drm_*_get() and drm_*_put() adn should not be used by new code. So convert all users of compatibility functions to use the new APIs. Signed-off-by: Cihangir Akturk --- drivers/gpu/drm/mediatek/mtk_drm_fb.c | 4 ++-- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_fb.c b/drivers/gpu/drm/mediatek/mtk_drm_fb.c index d4246c9..0d8d506 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_fb.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_fb.c @@ -58,7 +58,7 @@ static void mtk_drm_fb_destroy(struct drm_framebuffer *fb) drm_framebuffer_cleanup(fb); - drm_gem_object_unreference_unlocked(mtk_fb->gem_obj); + drm_gem_object_put_unlocked(mtk_fb->gem_obj); kfree(mtk_fb); } @@ -160,6 +160,6 @@ struct drm_framebuffer *mtk_drm_mode_fb_create(struct drm_device *dev, return &mtk_fb->base; unreference: - drm_gem_object_unreference_unlocked(gem); + drm_gem_object_put_unlocked(gem); return ERR_PTR(ret); } diff --git a/drivers/gpu/drm/mediatek/mtk_drm_gem.c b/drivers/gpu/drm/mediatek/mtk_drm_gem.c index 7abc550..961cbf5 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_gem.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_gem.c @@ -122,7 +122,7 @@ int mtk_drm_gem_dumb_create(struct drm_file *file_priv, struct drm_device *dev, goto err_handle_create; /* drop reference from allocate - handle holds it now. */ - drm_gem_object_unreference_unlocked(&mtk_gem->base); + drm_gem_object_put_unlocked(&mtk_gem->base); return 0; @@ -152,7 +152,7 @@ int mtk_drm_gem_dumb_map_offset(struct drm_file *file_priv, DRM_DEBUG_KMS("offset = 0x%llx\n", *offset); out: - drm_gem_object_unreference_unlocked(obj); + drm_gem_object_put_unlocked(obj); return ret; }