@@ -98,6 +98,7 @@ static const struct drm_bridge_funcs cros_ec_anx7688_bridge_funcs = {
static int cros_ec_anx7688_bridge_probe(struct i2c_client *client)
{
struct device *dev = &client->dev;
+ struct fwnode_handle *fwnode = dev_fwnode(dev);
struct cros_ec_anx7688 *anx7688;
u16 vendor, device, fw_version;
u8 buffer[4];
@@ -143,7 +144,7 @@ static int cros_ec_anx7688_bridge_probe(struct i2c_client *client)
fw_version = (u16)buffer[0] << 8 | buffer[1];
dev_info(dev, "ANX7688 firmware version 0x%04x\n", fw_version);
- anx7688->bridge.of_node = dev->of_node;
+ drm_bridge_set_node(&anx7688->bridge, fwnode);
/* FW version >= 0.85 supports bandwidth/lane count registers */
if (fw_version >= ANX7688_MINIMUM_FW_VERSION)
Switch to use the freshly created drm_bridge_set_node() helper, because fwnode APIs can be used to abstract DT dependent APIs away. As the fwnode APIs has wider coverage than DT counterpart, driver don't have to bear the burden of "OF dependent", let the core take the resposibility. No functional changes. Signed-off-by: Sui Jingfeng <sui.jingfeng@linux.dev> --- drivers/gpu/drm/bridge/cros-ec-anx7688.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)