diff --git a/drivers/gpu/drm/arc/arcpgu.h b/drivers/gpu/drm/arc/arcpgu.h index 52afd638a4d2..c52cdd2274e1 100644 --- a/drivers/gpu/drm/arc/arcpgu.h +++ b/drivers/gpu/drm/arc/arcpgu.h @@ -15,6 +15,7 @@ struct arcpgu_drm_private { void __iomem *regs; struct clk *clk; struct drm_simple_display_pipe pipe; + struct drm_connector sim_conn; }; #define dev_to_arcpgu(x) container_of(x, struct arcpgu_drm_private, drm) diff --git a/drivers/gpu/drm/arc/arcpgu_sim.c b/drivers/gpu/drm/arc/arcpgu_sim.c index 134afb9fa625..e42fe5d05a3d 100644 --- a/drivers/gpu/drm/arc/arcpgu_sim.c +++ b/drivers/gpu/drm/arc/arcpgu_sim.c @@ -18,10 +18,6 @@ #define YRES_MAX 8192 -struct arcpgu_drm_connector { - struct drm_connector connector; -}; - static int arcpgu_drm_connector_get_modes(struct drm_connector *connector) { int count; @@ -57,7 +53,6 @@ static struct drm_encoder_funcs arcpgu_drm_encoder_funcs = { int arcpgu_drm_sim_init(struct drm_device *drm, struct device_node *np) { struct arcpgu_drm_private *arcpgu = dev_to_arcpgu(drm); - struct arcpgu_drm_connector *arcpgu_connector; struct drm_encoder *encoder; struct drm_connector *connector; int ret; @@ -72,14 +67,7 @@ int arcpgu_drm_sim_init(struct drm_device *drm, struct device_node *np) if (ret) return ret; - arcpgu_connector = devm_kzalloc(drm->dev, sizeof(*arcpgu_connector), - GFP_KERNEL); - if (!arcpgu_connector) { - ret = -ENOMEM; - goto error_encoder_cleanup; - } - - connector = &arcpgu_connector->connector; + connector = &arcpgu->sim_conn; drm_connector_helper_add(connector, &arcpgu_drm_connector_helper_funcs); ret = drm_connector_init(drm, connector, &arcpgu_drm_connector_funcs,