OSDN Git Service

staging: vboxvideo: Drop unnecessary drm_connector_helper_funcs callbacks
authorHans de Goede <hdegoede@redhat.com>
Sat, 29 Sep 2018 12:18:24 +0000 (14:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 29 Sep 2018 12:31:33 +0000 (05:31 -0700)
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: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/vboxvideo/vbox_mode.c

index 4993a6c..756544b 100644 (file)
@@ -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 = {