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

Commit 0c762dda authored by Hans de Goede's avatar Hans de Goede Committed by Greg Kroah-Hartman
Browse files

staging: vboxvideo: Drop unnecessary drm_connector_helper_funcs callbacks



vbox_mode_valid always returns MODE_OK, which is also the default if no
mode_valid callback is defined.

vbox_best_single_encoder chains to drm_encoder_find, the drm-core will
call drm_encoder_find itself if there is no best_encoder call back.

Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b8384ea3
Loading
Loading
Loading
Loading
+0 −20
Original line number Diff line number Diff line
@@ -651,18 +651,6 @@ static void vbox_encoder_destroy(struct drm_encoder *encoder)
	kfree(encoder);
}

static struct drm_encoder *vbox_best_single_encoder(struct drm_connector
						    *connector)
{
	int enc_id = connector->encoder_ids[0];

	/* pick the encoder ids */
	if (enc_id)
		return drm_encoder_find(connector->dev, NULL, enc_id);

	return NULL;
}

static const struct drm_encoder_funcs vbox_enc_funcs = {
	.destroy = vbox_encoder_destroy,
};
@@ -820,12 +808,6 @@ static int vbox_get_modes(struct drm_connector *connector)
	return num_modes;
}

static enum drm_mode_status vbox_mode_valid(struct drm_connector *connector,
			   struct drm_display_mode *mode)
{
	return MODE_OK;
}

static void vbox_connector_destroy(struct drm_connector *connector)
{
	drm_connector_unregister(connector);
@@ -862,9 +844,7 @@ static int vbox_fill_modes(struct drm_connector *connector, u32 max_x,
}

static const struct drm_connector_helper_funcs vbox_connector_helper_funcs = {
	.mode_valid = vbox_mode_valid,
	.get_modes = vbox_get_modes,
	.best_encoder = vbox_best_single_encoder,
};

static const struct drm_connector_funcs vbox_connector_funcs = {