From d0a516347688eb031902852aaa7f5e72ee1db3c8 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Noralf=20Tr=C3=B8nnes?= Date: Sun, 10 Feb 2019 14:10:33 +0100 Subject: [PATCH] drm/tinydrm: Remove tinydrm_shutdown() MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Link: https://patchwork.freedesktop.org/patch/msgid/20190210131039.52664-7-noralf@tronnes.org --- 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 554abd5d3b53..2366a33fd62f 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 5a1ec0451c19..cb0ea98306a0 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 @@ -243,16 +244,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 d40814d370e2..7837b785a993 100644 --- a/drivers/gpu/drm/tinydrm/ili9225.c +++ b/drivers/gpu/drm/tinydrm/ili9225.c @@ -20,6 +20,7 @@ #include #include