History

drm: Turn DRM_MODE_SUBCONNECTOR_xx definitions into an enum

List of values like the DRM_MODE_SUBCONNECTOR_xx ones are better represented with enums. Turn the DRM_MODE_SUBCONNECTOR_xx macros into an enum.

Boris Brezillon committed 9 years ago

Commit dee7a4f1 parent ab8df601 file · +10 −8Browse files

Unified · Split

include/uapi/drm/drm_mode.h+10−8
@@ -220,14 +220,16 @@ struct drm_mode_get_encoder { · 219 unmodified lines
220220
221221 /* This is for connectors with multiple signal types. */
222222 /* Try to match DRM_MODE_CONNECTOR_X as closely as possible. */
223−#define DRM_MODE_SUBCONNECTOR_Automatic 0
224−#define DRM_MODE_SUBCONNECTOR_Unknown 0
225−#define DRM_MODE_SUBCONNECTOR_DVID 3
226−#define DRM_MODE_SUBCONNECTOR_DVIA 4
227−#define DRM_MODE_SUBCONNECTOR_Composite 5
228−#define DRM_MODE_SUBCONNECTOR_SVIDEO 6
229−#define DRM_MODE_SUBCONNECTOR_Component 8
230−#define DRM_MODE_SUBCONNECTOR_SCART 9
223+enum drm_mode_subconnector {
224+ DRM_MODE_SUBCONNECTOR_Automatic = 0,
225+ DRM_MODE_SUBCONNECTOR_Unknown = 0,
226+ DRM_MODE_SUBCONNECTOR_DVID = 3,
227+ DRM_MODE_SUBCONNECTOR_DVIA = 4,
228+ DRM_MODE_SUBCONNECTOR_Composite = 5,
229+ DRM_MODE_SUBCONNECTOR_SVIDEO = 6,
230+ DRM_MODE_SUBCONNECTOR_Component = 8,
231+ DRM_MODE_SUBCONNECTOR_SCART = 9,
232+};
231233
232234 #define DRM_MODE_CONNECTOR_Unknown 0
233235 #define DRM_MODE_CONNECTOR_VGA 1