Commit 95a0cfe9 authored by Noralf Trønnes's avatar Noralf Trønnes

drm/tinydrm: Drop driver registered message

No need to put out a driver registered message since drm_dev_register()
does that now. SPI speed is an important metric when dealing with
display problems, so retain that info.

Cc: David Lechner <david@lechnology.com>
Signed-off-by: default avatarNoralf Trønnes <noralf@tronnes.org>
Acked-by: default avatarDavid Lechner <david@lechnology.com>
Link: https://patchwork.freedesktop.org/patch/msgid/1504883250-43487-8-git-send-email-noralf@tronnes.org
parent a5ea8a68
...@@ -163,7 +163,6 @@ MODULE_DEVICE_TABLE(spi, mi0283qt_id); ...@@ -163,7 +163,6 @@ MODULE_DEVICE_TABLE(spi, mi0283qt_id);
static int mi0283qt_probe(struct spi_device *spi) static int mi0283qt_probe(struct spi_device *spi)
{ {
struct device *dev = &spi->dev; struct device *dev = &spi->dev;
struct tinydrm_device *tdev;
struct mipi_dbi *mipi; struct mipi_dbi *mipi;
struct gpio_desc *dc; struct gpio_desc *dc;
u32 rotation = 0; u32 rotation = 0;
...@@ -215,20 +214,9 @@ static int mi0283qt_probe(struct spi_device *spi) ...@@ -215,20 +214,9 @@ static int mi0283qt_probe(struct spi_device *spi)
return ret; return ret;
} }
tdev = &mipi->tinydrm;
ret = devm_tinydrm_register(tdev);
if (ret)
return ret;
spi_set_drvdata(spi, mipi); spi_set_drvdata(spi, mipi);
DRM_DEBUG_DRIVER("Initialized %s:%s @%uMHz on minor %d\n", return devm_tinydrm_register(&mipi->tinydrm);
tdev->drm->driver->name, dev_name(dev),
spi->max_speed_hz / 1000000,
tdev->drm->primary->index);
return 0;
} }
static void mi0283qt_shutdown(struct spi_device *spi) static void mi0283qt_shutdown(struct spi_device *spi)
......
...@@ -842,6 +842,8 @@ int mipi_dbi_spi_init(struct spi_device *spi, struct mipi_dbi *mipi, ...@@ -842,6 +842,8 @@ int mipi_dbi_spi_init(struct spi_device *spi, struct mipi_dbi *mipi,
return -ENOMEM; return -ENOMEM;
} }
DRM_DEBUG_DRIVER("SPI speed: %uMHz\n", spi->max_speed_hz / 1000000);
return 0; return 0;
} }
EXPORT_SYMBOL(mipi_dbi_spi_init); EXPORT_SYMBOL(mipi_dbi_spi_init);
......
...@@ -1078,19 +1078,11 @@ static int repaper_probe(struct spi_device *spi) ...@@ -1078,19 +1078,11 @@ static int repaper_probe(struct spi_device *spi)
return ret; return ret;
drm_mode_config_reset(tdev->drm); drm_mode_config_reset(tdev->drm);
ret = devm_tinydrm_register(tdev);
if (ret)
return ret;
spi_set_drvdata(spi, tdev); spi_set_drvdata(spi, tdev);
DRM_DEBUG_DRIVER("Initialized %s:%s @%uMHz on minor %d\n", DRM_DEBUG_DRIVER("SPI speed: %uMHz\n", spi->max_speed_hz / 1000000);
tdev->drm->driver->name, dev_name(dev),
spi->max_speed_hz / 1000000,
tdev->drm->primary->index);
return 0; return devm_tinydrm_register(tdev);
} }
static void repaper_shutdown(struct spi_device *spi) static void repaper_shutdown(struct spi_device *spi)
......
...@@ -343,7 +343,6 @@ MODULE_DEVICE_TABLE(spi, st7586_id); ...@@ -343,7 +343,6 @@ MODULE_DEVICE_TABLE(spi, st7586_id);
static int st7586_probe(struct spi_device *spi) static int st7586_probe(struct spi_device *spi)
{ {
struct device *dev = &spi->dev; struct device *dev = &spi->dev;
struct tinydrm_device *tdev;
struct mipi_dbi *mipi; struct mipi_dbi *mipi;
struct gpio_desc *a0; struct gpio_desc *a0;
u32 rotation = 0; u32 rotation = 0;
...@@ -388,20 +387,9 @@ static int st7586_probe(struct spi_device *spi) ...@@ -388,20 +387,9 @@ static int st7586_probe(struct spi_device *spi)
if (ret) if (ret)
return ret; return ret;
tdev = &mipi->tinydrm;
ret = devm_tinydrm_register(tdev);
if (ret)
return ret;
spi_set_drvdata(spi, mipi); spi_set_drvdata(spi, mipi);
DRM_DEBUG_DRIVER("Initialized %s:%s @%uMHz on minor %d\n", return devm_tinydrm_register(&mipi->tinydrm);
tdev->drm->driver->name, dev_name(dev),
spi->max_speed_hz / 1000000,
tdev->drm->primary->index);
return 0;
} }
static void st7586_shutdown(struct spi_device *spi) static void st7586_shutdown(struct spi_device *spi)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment