mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-02 03:30:08 -04:00
drm/bridge: sii902x: convert to of_drm_find_and_get_bridge()
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. Acked-by: Maxime Ripard <mripard@kernel.org> Link: https://patch.msgid.link/20260109-drm-bridge-alloc-getput-drm_of_find_bridge-2-v2-3-8bad3ef90b9f@bootlin.com Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
This commit is contained in:
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user