From patchwork Wed Jun 15 12:17:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chris Wilson X-Patchwork-Id: 9178405 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 200476021C for ; Wed, 15 Jun 2016 12:19:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 110A927BFC for ; Wed, 15 Jun 2016 12:19:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 05ABD27CEA; Wed, 15 Jun 2016 12:19:26 +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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E859527BFC for ; Wed, 15 Jun 2016 12:19:24 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1bD9n1-0002R5-A0; Wed, 15 Jun 2016 12:19:23 +0000 Received: from mail-wm0-x243.google.com ([2a00:1450:400c:c09::243]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1bD9mq-0002Ey-PN; Wed, 15 Jun 2016 12:19:14 +0000 Received: by mail-wm0-x243.google.com with SMTP id k184so5531031wme.2; Wed, 15 Jun 2016 05:18:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=65wDTGZM79rdhb2iQjWGNo6/N8lGScIJEcvUM4i2neY=; b=aiWZS75UK6rrZgU9zhaam36o/Ra3RQOpYpgsP1qkuVUL8tJ1l/0EuF70l4/w2JJolz lYWmYRyt9S63qsjqeD89WnRteSEZVa4mqVNtPGLlkbSFQ0DPZmz71LLb8i2vTqs+lMk0 hSfaq+FI7/A4Hl+KINGEoXxQuQcsyBl9Pz+eFxYI5GO7A7l4Mfg00v+/HEMwbyPosJvt NWYAHCVtk2HN2c9OZe/NLxtKqFVDAycKJhkSkaUeJQZ9zWbv1DZdwXTPggm/nQpf+cea I0p114NzBQHksj4KgWnBOWAKvlHmUAnmNQwOdiMBjzYC5T2lEhE4UAHQ95rI83GjIHRZ 8ytA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=65wDTGZM79rdhb2iQjWGNo6/N8lGScIJEcvUM4i2neY=; b=CcwQ3wKV7VegDA7nChpOl0bRvnKfhpgqmGi4yf9/IDgVRBlfMGDYUvC+MVKqwCrimo YQ35Ol4Tq3+yP+YvMBg/dRST4C/sDiGDQdsF5zj6HbIOKzO7FVcET+qdy29u9q7al1Ca 8Wn2qyI1549DxVak//zfUWXzfqbujuZkB8ngTFm7R4mGCQaEzEMu+shVeMhozdvQsihn MtwszPV6fnY/tJ2jzhpRgHnYytZTJArRd5b3zEAbR0tvjr11oeA/77Q5yDig9smh1ZTR pFhW9qwjYiKGfzgliRW0ytqYZmjoJh1QrIWm4mUkvb/3e6FzEUBWpoBKGGDstQD3qe44 9V2A== X-Gm-Message-State: ALyK8tJ24bPOr3i2Xx/IcAcydq3JA7QPYGcmzdyir46rpjjjK+GLySp0tyhpzh/CrtKOGQ== X-Received: by 10.194.239.232 with SMTP id vv8mr10978839wjc.166.1465993129517; Wed, 15 Jun 2016 05:18:49 -0700 (PDT) Received: from haswell.alporthouse.com ([78.156.65.138]) by smtp.gmail.com with ESMTPSA id jf3sm7450242wjb.41.2016.06.15.05.18.48 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 15 Jun 2016 05:18:48 -0700 (PDT) From: Chris Wilson To: intel-gfx@lists.freedesktop.org Subject: [PATCH 09/44] drm/mediatek: Remove redundant calls to drm_connector_register_all() Date: Wed, 15 Jun 2016 13:17:54 +0100 Message-Id: <1465993109-19523-10-git-send-email-chris@chris-wilson.co.uk> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1465993109-19523-1-git-send-email-chris@chris-wilson.co.uk> References: <1465993109-19523-1-git-send-email-chris@chris-wilson.co.uk> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20160615_051912_988267_51B2A527 X-CRM114-Status: GOOD ( 11.55 ) X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: David Airlie , Daniel Vetter , dri-devel@lists.freedesktop.org, Chris Wilson , linux-mediatek@lists.infradead.org, Matthias Brugger , 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 Up to now, the recommendation was for drivers to call drm_dev_register() followed by drm_connector_register_all(). Now that drm_connector_register() is safe against multiple invocations, we can move drm_connector_register_all() to drm_dev_register() and not suffer from any backwards compatibility issues with drivers not following the more rigorous init ordering. Signed-off-by: Chris Wilson Cc: Daniel Vetter Cc: Matthias Brugger Cc: David Airlie Cc: dri-devel@lists.freedesktop.org Cc: linux-arm-kernel@lists.infradead.org Cc: linux-mediatek@lists.infradead.org --- drivers/gpu/drm/mediatek/mtk_drm_drv.c | 7 ------- 1 file changed, 7 deletions(-) diff --git a/drivers/gpu/drm/mediatek/mtk_drm_drv.c b/drivers/gpu/drm/mediatek/mtk_drm_drv.c index c33bf98c5d5e..7ab91f4a200f 100644 --- a/drivers/gpu/drm/mediatek/mtk_drm_drv.c +++ b/drivers/gpu/drm/mediatek/mtk_drm_drv.c @@ -293,14 +293,8 @@ static int mtk_drm_bind(struct device *dev) if (ret < 0) goto err_deinit; - ret = drm_connector_register_all(drm); - if (ret < 0) - goto err_unregister; - return 0; -err_unregister: - drm_dev_unregister(drm); err_deinit: mtk_drm_kms_deinit(drm); err_free: @@ -455,7 +449,6 @@ static int mtk_drm_remove(struct platform_device *pdev) struct drm_device *drm = private->drm; int i; - drm_connector_unregister_all(drm); drm_dev_unregister(drm); mtk_drm_kms_deinit(drm); drm_dev_unref(drm);