summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@localhost.(none)>2008-03-04 17:52:37 +0000
committerAlan Hourihane <alanh@localhost.(none)>2008-03-05 10:35:46 +0000
commit8bfe29d9e44690a3896406acb25ca654dfad054d (patch)
tree91b9fceeef81fff92727db5214cbb824d968dedc /linux-core
parent3ea1902be993e88c068ce67355e2b3d253d1c9f2 (diff)
Use ARRAY_SIZE
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_crtc.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/linux-core/drm_crtc.c b/linux-core/drm_crtc.c
index 5f93275a..dfa0987f 100644
--- a/linux-core/drm_crtc.c
+++ b/linux-core/drm_crtc.c
@@ -735,20 +735,20 @@ static int drm_mode_create_standard_output_properties(struct drm_device *dev)
"EDID", 0);
dev->mode_config.dpms_property =
- drm_property_create(dev, DRM_MODE_PROP_ENUM, "DPMS", 4);
-
+ drm_property_create(dev, DRM_MODE_PROP_ENUM,
+ "DPMS", ARRAY_SIZE(drm_dpms_enum_list));
for (i = 0; i < ARRAY_SIZE(drm_dpms_enum_list); i++)
drm_property_add_enum(dev->mode_config.dpms_property, i, drm_dpms_enum_list[i].type, drm_dpms_enum_list[i].name);
dev->mode_config.connector_type_property =
drm_property_create(dev, DRM_MODE_PROP_ENUM | DRM_MODE_PROP_IMMUTABLE,
- "Connector Type", 10);
+ "Connector Type", ARRAY_SIZE(drm_conn_enum_list));
for (i = 0; i < ARRAY_SIZE(drm_conn_enum_list); i++)
drm_property_add_enum(dev->mode_config.connector_type_property, i, drm_conn_enum_list[i].type, drm_conn_enum_list[i].name);
dev->mode_config.connector_num_property =
drm_property_create(dev, DRM_MODE_PROP_RANGE | DRM_MODE_PROP_IMMUTABLE,
- "Connector ID", 2);
+ "Connector ID", 2);
dev->mode_config.connector_num_property->values[0] = 0;
dev->mode_config.connector_num_property->values[1] = 20;
@@ -783,7 +783,6 @@ static int drm_mode_create_standard_output_properties(struct drm_device *dev)
dev->mode_config.tv_bottom_margin_property->values[0] = 0;
dev->mode_config.tv_bottom_margin_property->values[1] = 100;
-
return 0;
}