[PATCH v3 07/22] drm/bridge: sii902x: convert to devm_drm_bridge_alloc() API
Anusha Srivatsa
asrivats at redhat.com
Fri May 9 20:04:59 UTC 2025
On Fri, May 9, 2025 at 9:56 AM Luca Ceresoli <luca.ceresoli at bootlin.com>
wrote:
> This is the new API for allocating DRM bridges.
>
> Signed-off-by: Luca Ceresoli <luca.ceresoli at bootlin.com>
> ---
> drivers/gpu/drm/bridge/sii902x.c | 7 +++----
> 1 file changed, 3 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/bridge/sii902x.c
> b/drivers/gpu/drm/bridge/sii902x.c
> index
> 6de61d9fe06487856e8b3c32db3c8d8c25633fd8..882973e900628c0d972d32cd4ff3588432daa8e9
> 100644
> --- a/drivers/gpu/drm/bridge/sii902x.c
> +++ b/drivers/gpu/drm/bridge/sii902x.c
> @@ -1135,7 +1135,6 @@ static int sii902x_init(struct sii902x *sii902x)
> if (ret)
> goto err_unreg_audio;
>
> - sii902x->bridge.funcs = &sii902x_bridge_funcs;
> sii902x->bridge.of_node = dev->of_node;
> sii902x->bridge.timings = &default_sii902x_timings;
> sii902x->bridge.ops = DRM_BRIDGE_OP_DETECT | DRM_BRIDGE_OP_EDID;
> @@ -1170,9 +1169,9 @@ static int sii902x_probe(struct i2c_client *client)
> return -EIO;
> }
>
> - sii902x = devm_kzalloc(dev, sizeof(*sii902x), GFP_KERNEL);
> - if (!sii902x)
> - return -ENOMEM;
> + sii902x = devm_drm_bridge_alloc(dev, struct sii902x, bridge,
> &sii902x_bridge_funcs);
> + if (IS_ERR(sii902x))
> + return PTR_ERR(sii902x);
>
> sii902x->i2c = client;
> sii902x->regmap = devm_regmap_init_i2c(client,
> &sii902x_regmap_config);
>
> --
Reviewed-by: Anusha Srivatsa <asrivats at redhat.com>
Thanks,
Anusha
>
> 2.49.0
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/freedreno/attachments/20250509/8b2ef171/attachment.htm>
More information about the Freedreno
mailing list