Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 79d11e96 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Tomi Valkeinen
Browse files

drm/omap: Don't pass display pointer to encoder init function



The display isn't used by the encoder implementation, don't pass it to
the initialization function and store it internally needlessly.

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Tested-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent 40e5f937
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -296,7 +296,7 @@ static int omap_modeset_init(struct drm_device *dev)
		struct drm_encoder *encoder;
		struct drm_crtc *crtc;

		encoder = omap_encoder_init(dev, pipe->output, display);
		encoder = omap_encoder_init(dev, pipe->output);
		if (!encoder)
			return -ENOMEM;

+1 −4
Original line number Diff line number Diff line
@@ -37,7 +37,6 @@
struct omap_encoder {
	struct drm_encoder base;
	struct omap_dss_device *output;
	struct omap_dss_device *display;
};

static void omap_encoder_destroy(struct drm_encoder *encoder)
@@ -247,8 +246,7 @@ static const struct drm_encoder_helper_funcs omap_encoder_helper_funcs = {

/* initialize encoder */
struct drm_encoder *omap_encoder_init(struct drm_device *dev,
				      struct omap_dss_device *output,
				      struct omap_dss_device *display)
				      struct omap_dss_device *output)
{
	struct drm_encoder *encoder = NULL;
	struct omap_encoder *omap_encoder;
@@ -258,7 +256,6 @@ struct drm_encoder *omap_encoder_init(struct drm_device *dev,
		goto fail;

	omap_encoder->output = output;
	omap_encoder->display = display;

	encoder = &omap_encoder->base;

+1 −2
Original line number Diff line number Diff line
@@ -25,7 +25,6 @@ struct drm_encoder;
struct omap_dss_device;

struct drm_encoder *omap_encoder_init(struct drm_device *dev,
				      struct omap_dss_device *output,
				      struct omap_dss_device *display);
				      struct omap_dss_device *output);

#endif /* __OMAPDRM_ENCODER_H__ */