diff options
| -rw-r--r-- | drivers/gpu/drm/drm_of.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/gpu/drm/drm_of.c b/drivers/gpu/drm/drm_of.c index 16150a00c237..aaa130736bf8 100644 --- a/drivers/gpu/drm/drm_of.c +++ b/drivers/gpu/drm/drm_of.c | |||
| @@ -43,14 +43,10 @@ static uint32_t drm_crtc_port_mask(struct drm_device *dev, | |||
| 43 | uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, | 43 | uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, |
| 44 | struct device_node *port) | 44 | struct device_node *port) |
| 45 | { | 45 | { |
| 46 | struct device_node *remote_port, *ep = NULL; | 46 | struct device_node *remote_port, *ep; |
| 47 | uint32_t possible_crtcs = 0; | 47 | uint32_t possible_crtcs = 0; |
| 48 | 48 | ||
| 49 | do { | 49 | for_each_endpoint_of_node(port, ep) { |
| 50 | ep = of_graph_get_next_endpoint(port, ep); | ||
| 51 | if (!ep) | ||
| 52 | break; | ||
| 53 | |||
| 54 | remote_port = of_graph_get_remote_port(ep); | 50 | remote_port = of_graph_get_remote_port(ep); |
| 55 | if (!remote_port) { | 51 | if (!remote_port) { |
| 56 | of_node_put(ep); | 52 | of_node_put(ep); |
| @@ -60,7 +56,7 @@ uint32_t drm_of_find_possible_crtcs(struct drm_device *dev, | |||
| 60 | possible_crtcs |= drm_crtc_port_mask(dev, remote_port); | 56 | possible_crtcs |= drm_crtc_port_mask(dev, remote_port); |
| 61 | 57 | ||
| 62 | of_node_put(remote_port); | 58 | of_node_put(remote_port); |
| 63 | } while (1); | 59 | } |
| 64 | 60 | ||
| 65 | return possible_crtcs; | 61 | return possible_crtcs; |
| 66 | } | 62 | } |
