summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/arc/arcpgu_sim.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/arc/arcpgu_sim.c')
-rw-r--r--drivers/gpu/drm/arc/arcpgu_sim.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/gpu/drm/arc/arcpgu_sim.c b/drivers/gpu/drm/arc/arcpgu_sim.c
index 37d961668dfe..134afb9fa625 100644
--- a/drivers/gpu/drm/arc/arcpgu_sim.c
+++ b/drivers/gpu/drm/arc/arcpgu_sim.c
@@ -56,14 +56,13 @@ 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;
- encoder = devm_kzalloc(drm->dev, sizeof(*encoder), GFP_KERNEL);
- if (encoder == NULL)
- return -ENOMEM;
+ encoder = &arcpgu->pipe.encoder;
encoder->possible_crtcs = 1;
encoder->possible_clones = 0;