summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
diff options
context:
space:
mode:
authorRob Clark <robin.clark@oss.qualcomm.com>2025-06-29 05:54:49 +0300
committerRob Clark <robin.clark@oss.qualcomm.com>2025-06-29 05:54:49 +0300
commit74f1af95820fc2ee580a775a3a17c416db30b38c (patch)
tree7c82cffe3c1d99b99053d28b57a4ac5d81f85844 /drivers/gpu/drm/panel/panel-sitronix-st7789v.c
parentd3deabe4c619875714b9a844b1a3d9752dbae1dd (diff)
parentf41830c57bb8e70e283b9db251c95f1270a8279d (diff)
downloadlinux-74f1af95820fc2ee580a775a3a17c416db30b38c.tar.xz
Merge remote-tracking branch 'drm/drm-next' into msm-next
Back-merge drm-next to (indirectly) get arm-smmu updates for making stall-on-fault more reliable. Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
Diffstat (limited to 'drivers/gpu/drm/panel/panel-sitronix-st7789v.c')
-rw-r--r--drivers/gpu/drm/panel/panel-sitronix-st7789v.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
index 28bfc48a9127..04d91929eedd 100644
--- a/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
+++ b/drivers/gpu/drm/panel/panel-sitronix-st7789v.c
@@ -612,9 +612,10 @@ static int st7789v_probe(struct spi_device *spi)
struct st7789v *ctx;
int ret;
- ctx = devm_kzalloc(dev, sizeof(*ctx), GFP_KERNEL);
- if (!ctx)
- return -ENOMEM;
+ ctx = devm_drm_panel_alloc(dev, struct st7789v, panel,
+ &st7789v_drm_funcs, DRM_MODE_CONNECTOR_DPI);
+ if (IS_ERR(ctx))
+ return PTR_ERR(ctx);
spi_set_drvdata(spi, ctx);
ctx->spi = spi;
@@ -626,9 +627,6 @@ static int st7789v_probe(struct spi_device *spi)
ctx->info = device_get_match_data(&spi->dev);
- drm_panel_init(&ctx->panel, dev, &st7789v_drm_funcs,
- DRM_MODE_CONNECTOR_DPI);
-
ctx->power = devm_regulator_get(dev, "power");
ret = PTR_ERR_OR_ZERO(ctx->power);
if (ret)