aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_crtc_helper.c
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2012-02-01 05:38:30 -0500
committerDave Airlie <airlied@redhat.com>2012-02-03 05:09:41 -0500
commita1178ca06213ba937b20d3d32102f64c15dd9a9d (patch)
tree0cc6e551340dc3a175cc5bf8c9ed53947b1d7940 /drivers/gpu/drm/drm_crtc_helper.c
parentb20f38679fee704d5ebfe2815fb5af492a0dde9f (diff)
drm crtc_helper: use list_for_each_entry
list_for_each_entry_safe is for walking a list safe against removal of entries. Here, no entries are removed, so use list_for_each_entry. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc_helper.c')
-rw-r--r--drivers/gpu/drm/drm_crtc_helper.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index 84a4a809793f..d761d1241152 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -44,12 +44,12 @@ module_param_named(poll, drm_kms_helper_poll, bool, 0600);
44static void drm_mode_validate_flag(struct drm_connector *connector, 44static void drm_mode_validate_flag(struct drm_connector *connector,
45 int flags) 45 int flags)
46{ 46{
47 struct drm_display_mode *mode, *t; 47 struct drm_display_mode *mode;
48 48
49 if (flags == (DRM_MODE_FLAG_DBLSCAN | DRM_MODE_FLAG_INTERLACE)) 49 if (flags == (DRM_MODE_FLAG_DBLSCAN | DRM_MODE_FLAG_INTERLACE))
50 return; 50 return;
51 51
52 list_for_each_entry_safe(mode, t, &connector->modes, head) { 52 list_for_each_entry(mode, &connector->modes, head) {
53 if ((mode->flags & DRM_MODE_FLAG_INTERLACE) && 53 if ((mode->flags & DRM_MODE_FLAG_INTERLACE) &&
54 !(flags & DRM_MODE_FLAG_INTERLACE)) 54 !(flags & DRM_MODE_FLAG_INTERLACE))
55 mode->status = MODE_NO_INTERLACE; 55 mode->status = MODE_NO_INTERLACE;
@@ -87,7 +87,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
87 uint32_t maxX, uint32_t maxY) 87 uint32_t maxX, uint32_t maxY)
88{ 88{
89 struct drm_device *dev = connector->dev; 89 struct drm_device *dev = connector->dev;
90 struct drm_display_mode *mode, *t; 90 struct drm_display_mode *mode;
91 struct drm_connector_helper_funcs *connector_funcs = 91 struct drm_connector_helper_funcs *connector_funcs =
92 connector->helper_private; 92 connector->helper_private;
93 int count = 0; 93 int count = 0;
@@ -96,7 +96,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
96 DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id, 96 DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n", connector->base.id,
97 drm_get_connector_name(connector)); 97 drm_get_connector_name(connector));
98 /* set all modes to the unverified state */ 98 /* set all modes to the unverified state */
99 list_for_each_entry_safe(mode, t, &connector->modes, head) 99 list_for_each_entry(mode, &connector->modes, head)
100 mode->status = MODE_UNVERIFIED; 100 mode->status = MODE_UNVERIFIED;
101 101
102 if (connector->force) { 102 if (connector->force) {
@@ -136,7 +136,7 @@ int drm_helper_probe_single_connector_modes(struct drm_connector *connector,
136 mode_flags |= DRM_MODE_FLAG_DBLSCAN; 136 mode_flags |= DRM_MODE_FLAG_DBLSCAN;
137 drm_mode_validate_flag(connector, mode_flags); 137 drm_mode_validate_flag(connector, mode_flags);
138 138
139 list_for_each_entry_safe(mode, t, &connector->modes, head) { 139 list_for_each_entry(mode, &connector->modes, head) {
140 if (mode->status == MODE_OK) 140 if (mode->status == MODE_OK)
141 mode->status = connector_funcs->mode_valid(connector, 141 mode->status = connector_funcs->mode_valid(connector,
142 mode); 142 mode);
@@ -152,7 +152,7 @@ prune:
152 152
153 DRM_DEBUG_KMS("[CONNECTOR:%d:%s] probed modes :\n", connector->base.id, 153 DRM_DEBUG_KMS("[CONNECTOR:%d:%s] probed modes :\n", connector->base.id,
154 drm_get_connector_name(connector)); 154 drm_get_connector_name(connector));
155 list_for_each_entry_safe(mode, t, &connector->modes, head) { 155 list_for_each_entry(mode, &connector->modes, head) {
156 mode->vrefresh = drm_mode_vrefresh(mode); 156 mode->vrefresh = drm_mode_vrefresh(mode);
157 157
158 drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V); 158 drm_mode_set_crtcinfo(mode, CRTC_INTERLACE_HALVE_V);