The delayed_slow_work code was replace with a more generic work queue,
with a subtle different API. This difference being that the new
queue_delayed_work() return 0 if the work is already on the queue,
non-zero otherwise. The DRM_ERROR() are now wrong (printed after a
successful insertion) and indeed superfluous so remove them.

Signed-off-by: Chris Wilson <ch...@chris-wilson.co.uk>
---
 drivers/gpu/drm/drm_crtc_helper.c |   20 ++++++++------------
 1 files changed, 8 insertions(+), 12 deletions(-)

diff --git a/drivers/gpu/drm/drm_crtc_helper.c 
b/drivers/gpu/drm/drm_crtc_helper.c
index 4598130..4552d7e 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -839,7 +839,6 @@ static void output_poll_execute(struct work_struct *work)
        struct drm_connector *connector;
        enum drm_connector_status old_status, status;
        bool repoll = false, changed = false;
-       int ret;
 
        mutex_lock(&dev->mode_config.mutex);
        list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
@@ -874,11 +873,10 @@ static void output_poll_execute(struct work_struct *work)
                        dev->mode_config.funcs->output_poll_changed(dev);
        }
 
-       if (repoll) {
-               ret = queue_delayed_work(system_nrt_wq, delayed_work, 
DRM_OUTPUT_POLL_PERIOD);
-               if (ret)
-                       DRM_ERROR("delayed enqueue failed %d\n", ret);
-       }
+       if (repoll)
+               queue_delayed_work(system_nrt_wq,
+                                  delayed_work,
+                                  DRM_OUTPUT_POLL_PERIOD);
 }
 
 void drm_kms_helper_poll_disable(struct drm_device *dev)
@@ -893,18 +891,16 @@ void drm_kms_helper_poll_enable(struct drm_device *dev)
 {
        bool poll = false;
        struct drm_connector *connector;
-       int ret;
 
        list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
                if (connector->polled)
                        poll = true;
        }
 
-       if (poll) {
-               ret = queue_delayed_work(system_nrt_wq, 
&dev->mode_config.output_poll_work, DRM_OUTPUT_POLL_PERIOD);
-               if (ret)
-                       DRM_ERROR("delayed enqueue failed %d\n", ret);
-       }
+       if (poll)
+               queue_delayed_work(system_nrt_wq,
+                                  &dev->mode_config.output_poll_work,
+                                  DRM_OUTPUT_POLL_PERIOD);
 }
 EXPORT_SYMBOL(drm_kms_helper_poll_enable);
 
-- 
1.7.1

_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/dri-devel

Reply via email to