of_drm_find_bridge() is deprecated. Move to its replacement of_drm_find_and_get_bridge() which gets a bridge reference, and ensure it is put when done by using the drm_bridge::next_bridge pointer.
Signed-off-by: Luca Ceresoli <[email protected]> --- 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 1f0aba28ad1e..12497f5ce4ff 100644 --- a/drivers/gpu/drm/bridge/sii902x.c +++ b/drivers/gpu/drm/bridge/sii902x.c @@ -175,7 +175,6 @@ struct sii902x { struct i2c_client *i2c; struct regmap *regmap; struct drm_bridge bridge; - struct drm_bridge *next_bridge; struct drm_connector connector; struct gpio_desc *reset_gpio; struct i2c_mux_core *i2cmux; @@ -421,7 +420,7 @@ static int sii902x_bridge_attach(struct drm_bridge *bridge, int ret; if (flags & DRM_BRIDGE_ATTACH_NO_CONNECTOR) - return drm_bridge_attach(encoder, sii902x->next_bridge, + return drm_bridge_attach(encoder, sii902x->bridge.next_bridge, bridge, flags); drm_connector_helper_add(&sii902x->connector, @@ -1204,9 +1203,9 @@ static int sii902x_probe(struct i2c_client *client) return -ENODEV; } - sii902x->next_bridge = of_drm_find_bridge(remote); + sii902x->bridge.next_bridge = of_drm_find_and_get_bridge(remote); of_node_put(remote); - if (!sii902x->next_bridge) + if (!sii902x->bridge.next_bridge) return dev_err_probe(dev, -EPROBE_DEFER, "Failed to find remote bridge\n"); } -- 2.52.0
