Message ID | 20250509-drm-bridge-convert-to-alloc-api-v3-15-b8bc1f16d7aa@bootlin.com |
---|---|
State | New |
Headers | show |
Series | drm: convert all bridges to devm_drm_bridge_alloc() | expand |
On Fri, 9 May 2025 15:53:41 +0200, Luca Ceresoli wrote: > This is the new API for allocating DRM bridges. > > Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> > Acked-by: Maxime Ripard <mripard@kernel.org> Thanks! Maxime
Hi Luca, On 5/9/25 15:53, Luca Ceresoli wrote: > This is the new API for allocating DRM bridges. > > Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> > > --- > > Cc: Alexandre Torgue <alexandre.torgue@foss.st.com> > Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> > Cc: Philippe Cornu <philippe.cornu@foss.st.com> > Cc: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com> > Cc: Yannick Fertre <yannick.fertre@foss.st.com> > --- I went away from keyboard for some time. Sorry for the delay : Acked-by: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com> Regards, Raphaël
diff --git a/drivers/gpu/drm/stm/lvds.c b/drivers/gpu/drm/stm/lvds.c index a3ae9a93ce6670eb2c4dd36b3e572fcbca791a1c..07788e8d3d8302a3951e97d64736b721033998d3 100644 --- a/drivers/gpu/drm/stm/lvds.c +++ b/drivers/gpu/drm/stm/lvds.c @@ -1049,9 +1049,9 @@ static int lvds_probe(struct platform_device *pdev) dev_dbg(dev, "Probing LVDS driver...\n"); - lvds = devm_kzalloc(dev, sizeof(*lvds), GFP_KERNEL); - if (!lvds) - return -ENOMEM; + lvds = devm_drm_bridge_alloc(dev, struct stm_lvds, lvds_bridge, &lvds_bridge_funcs); + if (IS_ERR(lvds)) + return PTR_ERR(lvds); lvds->dev = dev; @@ -1164,7 +1164,6 @@ static int lvds_probe(struct platform_device *pdev) goto err_lvds_probe; } - lvds->lvds_bridge.funcs = &lvds_bridge_funcs; lvds->lvds_bridge.of_node = dev->of_node; lvds->hw_version = lvds_read(lvds, LVDS_VERR);
This is the new API for allocating DRM bridges. Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com> --- Cc: Alexandre Torgue <alexandre.torgue@foss.st.com> Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com> Cc: Philippe Cornu <philippe.cornu@foss.st.com> Cc: Raphael Gallais-Pou <raphael.gallais-pou@foss.st.com> Cc: Yannick Fertre <yannick.fertre@foss.st.com> --- drivers/gpu/drm/stm/lvds.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)