From patchwork Sun Jan 20 11:43:13 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Noralf_Tr=C3=B8nnes?= X-Patchwork-Id: 10772359 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 8B1DA14E5 for ; Sun, 20 Jan 2019 11:43:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7B1072AA4A for ; Sun, 20 Jan 2019 11:43:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6F8072AA4C; Sun, 20 Jan 2019 11:43:42 +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=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED 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 D1E742AA4A for ; Sun, 20 Jan 2019 11:43:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 2784A6E5EB; Sun, 20 Jan 2019 11:43:38 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.domeneshop.no (smtp.domeneshop.no [IPv6:2a01:5b40:0:3005::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id D8CBA6E5F1 for ; Sun, 20 Jan 2019 11:43:31 +0000 (UTC) Received: from 211.81-166-168.customer.lyse.net ([81.166.168.211]:41476 helo=localhost.localdomain) by smtp.domeneshop.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.84_2) (envelope-from ) id 1glBVi-0000O0-1U; Sun, 20 Jan 2019 12:43:30 +0100 From: =?utf-8?q?Noralf_Tr=C3=B8nnes?= To: dri-devel@lists.freedesktop.org Subject: [PATCH 06/11] drm/tinydrm: Remove tinydrm_shutdown() Date: Sun, 20 Jan 2019 12:43:13 +0100 Message-Id: <20190120114318.49199-7-noralf@tronnes.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190120114318.49199-1-noralf@tronnes.org> References: <20190120114318.49199-1-noralf@tronnes.org> MIME-Version: 1.0 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: david@lechnology.com Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP It's just a wrapper around drm_atomic_helper_shutdown() now. Also store drm_device in the drvdata field, since that's what's used. Signed-off-by: Noralf Trønnes Reviewed-by: Sam Ravnborg --- drivers/gpu/drm/tinydrm/core/tinydrm-core.c | 14 -------------- drivers/gpu/drm/tinydrm/hx8357d.c | 7 +++---- drivers/gpu/drm/tinydrm/ili9225.c | 7 +++---- drivers/gpu/drm/tinydrm/ili9341.c | 7 +++---- drivers/gpu/drm/tinydrm/mi0283qt.c | 15 +++++---------- drivers/gpu/drm/tinydrm/repaper.c | 8 ++++---- drivers/gpu/drm/tinydrm/st7586.c | 7 +++---- drivers/gpu/drm/tinydrm/st7735r.c | 7 +++---- include/drm/tinydrm/tinydrm.h | 1 - 9 files changed, 24 insertions(+), 49 deletions(-) diff --git a/drivers/gpu/drm/tinydrm/core/tinydrm-core.c b/drivers/gpu/drm/tinydrm/core/tinydrm-core.c index 614f532ea89f..e4a77feaacd6 100644 --- a/drivers/gpu/drm/tinydrm/core/tinydrm-core.c +++ b/drivers/gpu/drm/tinydrm/core/tinydrm-core.c @@ -166,18 +166,4 @@ int devm_tinydrm_register(struct tinydrm_device *tdev) } EXPORT_SYMBOL(devm_tinydrm_register); -/** - * tinydrm_shutdown - Shutdown tinydrm - * @tdev: tinydrm device - * - * This function makes sure that the display pipeline is disabled. - * Used by drivers in their shutdown callback to turn off the display - * on machine shutdown and reboot. - */ -void tinydrm_shutdown(struct tinydrm_device *tdev) -{ - drm_atomic_helper_shutdown(tdev->drm); -} -EXPORT_SYMBOL(tinydrm_shutdown); - MODULE_LICENSE("GPL"); diff --git a/drivers/gpu/drm/tinydrm/hx8357d.c b/drivers/gpu/drm/tinydrm/hx8357d.c index ab604513b865..84dda622df85 100644 --- a/drivers/gpu/drm/tinydrm/hx8357d.c +++ b/drivers/gpu/drm/tinydrm/hx8357d.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -242,16 +243,14 @@ static int hx8357d_probe(struct spi_device *spi) if (ret) return ret; - spi_set_drvdata(spi, mipi); + spi_set_drvdata(spi, mipi->tinydrm.drm); return devm_tinydrm_register(&mipi->tinydrm); } static void hx8357d_shutdown(struct spi_device *spi) { - struct mipi_dbi *mipi = spi_get_drvdata(spi); - - tinydrm_shutdown(&mipi->tinydrm); + drm_atomic_helper_shutdown(spi_get_drvdata(spi)); } static struct spi_driver hx8357d_spi_driver = { diff --git a/drivers/gpu/drm/tinydrm/ili9225.c b/drivers/gpu/drm/tinydrm/ili9225.c index 40e1f98ca393..3f59cfbd31ba 100644 --- a/drivers/gpu/drm/tinydrm/ili9225.c +++ b/drivers/gpu/drm/tinydrm/ili9225.c @@ -20,6 +20,7 @@ #include #include