summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2019-10-26 17:21:12 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2024-01-08 14:01:21 +0100
commit075ec22212ef6fda8d054a1aece866ec8248c75b (patch)
tree3c7fab5b3cd251f049fd1b4eba8eebf6176301fe
parent41928bc2e84bddbe45aaf689eadc67ca804bb218 (diff)
drm/tiny/st7735r: set drvdata before registering
Otherwise things might go boom. Not a big chance of that happening since we don't implement suspend/resume support.
-rw-r--r--drivers/gpu/drm/tiny/st7735r.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/tiny/st7735r.c b/drivers/gpu/drm/tiny/st7735r.c
index 477eb36fbb70..448dcddc218b 100644
--- a/drivers/gpu/drm/tiny/st7735r.c
+++ b/drivers/gpu/drm/tiny/st7735r.c
@@ -235,12 +235,12 @@ static int st7735r_probe(struct spi_device *spi)
drm_mode_config_reset(drm);
+ spi_set_drvdata(spi, drm);
+
ret = drm_dev_register(drm, 0);
if (ret)
return ret;
- spi_set_drvdata(spi, drm);
-
drm_fbdev_generic_setup(drm, 0);
return 0;