Commit 7a909b2b authored by Luca Ceresoli's avatar Luca Ceresoli
Browse files

drm/bridge: anx7625: convert to devm_drm_bridge_alloc() API

parent bdfc5b29
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -2596,7 +2596,6 @@ static int anx7625_link_bridge(struct drm_dp_aux *aux)
		return ret;
	}

	platform->bridge.funcs = &anx7625_bridge_funcs;
	platform->bridge.of_node = dev->of_node;
	if (!anx7625_of_panel_on_aux_bus(dev))
		platform->bridge.ops |= DRM_BRIDGE_OP_EDID;
@@ -2630,10 +2629,10 @@ static int anx7625_i2c_probe(struct i2c_client *client)
		return -ENODEV;
	}

	platform = devm_kzalloc(dev, sizeof(*platform), GFP_KERNEL);
	if (!platform) {
	platform = devm_drm_bridge_alloc(dev, struct anx7625_data, bridge, &anx7625_bridge_funcs);
	if (IS_ERR(platform)) {
		DRM_DEV_ERROR(dev, "fail to allocate driver data\n");
		return -ENOMEM;
		return PTR_ERR(platform);
	}

	pdata = &platform->pdata;