drm/rcar-du: Rename platform data fields to match what they describe
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Sun, 16 Jun 2013 14:25:35 +0000 (16:25 +0200)
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Fri, 9 Aug 2013 21:17:44 +0000 (23:17 +0200)
The struct rcar_du_encoder_data encoder::field describes the encoder
type, and the rcar_du_encoder_lvds_data and rcar_du_encoder_vga_data
structures describe connector properties. Rename them accordingly.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
drivers/gpu/drm/rcar-du/rcar_du_encoder.c
drivers/gpu/drm/rcar-du/rcar_du_encoder.h
drivers/gpu/drm/rcar-du/rcar_du_kms.c
include/linux/platform_data/rcar-du.h

index 15a56433c80c285967d31053a71328f3a38f043c..0d0375c7ee4401f2200ec89f49dcb16fcd3c5ecc 100644 (file)
@@ -137,7 +137,7 @@ int rcar_du_encoder_init(struct rcar_du_device *rcdu,
        switch (type) {
        case RCAR_DU_ENCODER_LVDS:
                return rcar_du_lvds_connector_init(rcdu, renc,
-                                                  &data->u.lvds.panel);
+                                                  &data->connector.lvds.panel);
 
        case RCAR_DU_ENCODER_VGA:
                return rcar_du_vga_connector_init(rcdu, renc);
index 4f76e16bca88516e6734b382ba882a714155970f..08cde1293892344270315739d6ab7ce80e69fe86 100644 (file)
 #ifndef __RCAR_DU_ENCODER_H__
 #define __RCAR_DU_ENCODER_H__
 
+#include <linux/platform_data/rcar-du.h>
+
 #include <drm/drm_crtc.h>
 
 struct rcar_du_device;
-struct rcar_du_encoder_data;
 
 struct rcar_du_encoder {
        struct drm_encoder encoder;
index 3f8483cc0483429fab66a14a00547ba13cfda35e..a8eef167d51a14a3752328ee153d71a521359e58 100644 (file)
@@ -191,7 +191,7 @@ int rcar_du_modeset_init(struct rcar_du_device *rcdu)
                const struct rcar_du_encoder_data *pdata =
                        &rcdu->pdata->encoders[i];
 
-               if (pdata->encoder == RCAR_DU_ENCODER_UNUSED)
+               if (pdata->type == RCAR_DU_ENCODER_UNUSED)
                        continue;
 
                if (pdata->output >= ARRAY_SIZE(rcdu->crtcs)) {
@@ -201,8 +201,7 @@ int rcar_du_modeset_init(struct rcar_du_device *rcdu)
                        continue;
                }
 
-               rcar_du_encoder_init(rcdu, pdata->encoder, pdata->output,
-                                    pdata);
+               rcar_du_encoder_init(rcdu, pdata->type, pdata->output, pdata);
        }
 
        /* Set the possible CRTCs and possible clones. All encoders can be
index 80587fdbba3ef5adcf116afe9676f9b34543b583..64cd8635e6e64cd4a7fd137b8e3c3bbaf3516382 100644 (file)
@@ -28,22 +28,29 @@ struct rcar_du_panel_data {
        struct drm_mode_modeinfo mode;
 };
 
-struct rcar_du_encoder_lvds_data {
+struct rcar_du_connector_lvds_data {
        struct rcar_du_panel_data panel;
 };
 
-struct rcar_du_encoder_vga_data {
+struct rcar_du_connector_vga_data {
        /* TODO: Add DDC information for EDID retrieval */
 };
 
+/*
+ * struct rcar_du_encoder_data - Encoder platform data
+ * @type: the encoder type (RCAR_DU_ENCODER_*)
+ * @output: the DU output the connector is connected to
+ * @connector.lvds: platform data for LVDS connectors
+ * @connector.vga: platform data for VGA connectors
+ */
 struct rcar_du_encoder_data {
-       enum rcar_du_encoder_type encoder;
+       enum rcar_du_encoder_type type;
        unsigned int output;
 
        union {
-               struct rcar_du_encoder_lvds_data lvds;
-               struct rcar_du_encoder_vga_data vga;
-       } u;
+               struct rcar_du_connector_lvds_data lvds;
+               struct rcar_du_connector_vga_data vga;
+       } connector;
 };
 
 struct rcar_du_platform_data {