From patchwork Fri Aug 11 12:32:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cihangir Akturk X-Patchwork-Id: 9895739 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 B194360236 for ; Fri, 11 Aug 2017 12:35:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A2D3A28BDB for ; Fri, 11 Aug 2017 12:35:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 978EB28BE3; Fri, 11 Aug 2017 12:35:33 +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=-2.6 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW 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 2E1DA28BDB for ; Fri, 11 Aug 2017 12:35:33 +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=t5ijckfx47KK0V/iiXkgpDLsYtGCZruWdRj0shvb4Cc=; b=Vf6sm3c0LIcLIV0P7GdA4c9c7w 8FASAQqmBicKzzXhBkfv4a9D1UytFimb3X1R2V9OY9PhCbmiPwnL53EiEobPjHx9nKP1eCuUrsVQL BZyc8YxOpOfzh7A20p+ztG1M6nFIR1cRwKZFZpEi3yhUTTk8btpk3wNfycpSYG304QJwRUF0pePZI Grpn5PYSzCNcD9i2whzO+9Ic7BpRSEjxOrA0jwF0oJB5Fpzrsg5EuJBVQqT3ZJ+Rn7nAvJdBiH2+R 21fOZbheh2N1uQiPoJPkxfqqSupFW/gYQr4Mav4KnoIM4wW5t5dj9ZPHvXbwYFMtdRMz5BMkJHIUe lV3/xryA==; 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 1dg9A3-00025j-S7; Fri, 11 Aug 2017 12:35:31 +0000 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dg99F-0000Ib-Nc; Fri, 11 Aug 2017 12:35:00 +0000 Received: by mail-wr0-x243.google.com with SMTP id g32so2462750wrd.5; Fri, 11 Aug 2017 05:34:21 -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=B66b/CGuxWbh4S2E1icpJuRoNiVE/NXnSytNJi2DJrk=; b=iLyA8+wFZlz7oKnrQtay/2ET099N3NCIQTcDik48rnHpLtYPOhMMhF0dr0K8nCM5Vv b6mD+1kj4gOY5ALWe+ysEaXxwwHsosAJxV1631rDiB4GNIzmcAf3QkVCTcX8rJzJiQxV dNjvVlSmacnGvV3s89dczzPZjcMh3re7SqvE++jXlasENzRUSH5qLBI8gGnRpOKwSqX6 3jN0IVfL73YyaaamhA43CxeAImEDvXP9icmLzWdHE2cdL0oFEmbrqRvBuyFqNcWcJbQR 5h5ft9eHnWTW9HxedCX/6N+tPIOd1HGNRPhfzFwKCoFgxmH6yHP86jFFKWGcKek1pPCD VlVw== 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=B66b/CGuxWbh4S2E1icpJuRoNiVE/NXnSytNJi2DJrk=; b=JxTH9zooIc3jcyLrhBzwlOwcnaohbJmSA4yBnznksMkFIIa/lCzhOAlKZsahILuT9z ZRukBMhMibBA8Vgnqz7ElX6Itt7XN/Bild/Z9xR05FaEQvbUihrXfEOvgUKqrlwGa/ql OS6cA5PxZtRe9JD+wFvHYzKFD21QgL60r32WPBbS4fgctc+Z38brcDqxf+3RVBHw61dT 1WbALVbS3AMpI3NmxPdMljkz8L5Q65jXgM8OIsoS6BsjW496ZV99dq4/iCEisSKsasOQ /ho1EqXoCDlumSmwQKmlD/ds/icvrPIi9Wcl9AyxrGAXKkgID4tbK5ZyPqNNjE3auvMo 9DHw== X-Gm-Message-State: AHYfb5h+yEt/T/tX7+H+83JDT2H71A9UCTb4GThw/D5bBPAPPYnRTpBW 6CNwKkaDl4omzg== X-Received: by 10.223.151.133 with SMTP id s5mr10922137wrb.159.1502454859653; Fri, 11 Aug 2017 05:34:19 -0700 (PDT) Received: from localhost.localdomain ([161.9.194.184]) by smtp.gmail.com with ESMTPSA id n71sm928467wmg.13.2017.08.11.05.34.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 Aug 2017 05:34:19 -0700 (PDT) From: Cihangir Akturk To: Subject: [PATCH v3 13/28] drm/mediatek: switch to drm_*_get(), drm_*_put() helpers Date: Fri, 11 Aug 2017 15:32:59 +0300 Message-Id: <1502454794-28558-14-git-send-email-cakturk@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1502454794-28558-1-git-send-email-cakturk@gmail.com> References: <1502454794-28558-1-git-send-email-cakturk@gmail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170811_053442_547660_AE8CE211 X-CRM114-Status: GOOD ( 10.16 ) 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: daniel@ffwll.ch, 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 Use drm_*_get() and drm_*_put() helpers instead of drm_*_reference() and drm_*_unreference() helpers. drm_*_reference() and drm_*_unreference() functions are just compatibility alias for drm_*_get() and drm_*_put() and should not be used by new code. So convert all users of compatibility functions to use the new APIs. Generated by: scripts/coccinelle/api/drm-get-put.cocci Signed-off-by: Cihangir Akturk Reviewed-by: Philipp Zabel --- drivers/gpu/drm/mediatek/mtk_drm_fb.c | 4 ++-- drivers/gpu/drm/mediatek/mtk_drm_gem.c | 2 +- 2 files changed, 3 insertions(+), 3 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 8ec963f..f595ac8 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;