aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2010-08-09 06:01:27 -0400
committerTejun Heo <tj@kernel.org>2010-08-09 06:18:44 -0400
commit9a919c46dfa48a9c1f465174609b90253eb8ffc1 (patch)
tree99fce0fb5b98d59ee1843a8d949cf8261e5efbff /drivers
parentf6500947a9cbb81cfa07ff344f16955d9c6ebe61 (diff)
drm: fix fallouts from slow-work -> wq conversion
Commit 991ea75c (drm: use workqueue instead of slow-work), which made drm to use wq instead of slow-work, didn't account for the return value difference between delayed_slow_work_enqueue() and queue_delayed_work(). The former returns 0 on success and -errno on failures while the latter never fails and only uses the return value to indicate whether the work was already pending or not. This misconversion triggered spurious error messages. Remove the now unnecessary return value check and error message. Markus: caught another incorrect conversion in drm_kms_helper_poll_enable() Signed-off-by: Tejun Heo <tj@kernel.org> Reported-by: Markus Trippelsdorf <markus@trippelsdorf.de> Tested-by: Markus Trippelsdorf <markus@trippelsdorf.de> Cc: David Airlie <airlied@linux.ie> Cc: dri-devel@lists.freedesktop.org
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/drm_crtc_helper.c16
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index 45981304feb8..b9e4dbfa0533 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)
839 struct drm_connector *connector; 839 struct drm_connector *connector;
840 enum drm_connector_status old_status, status; 840 enum drm_connector_status old_status, status;
841 bool repoll = false, changed = false; 841 bool repoll = false, changed = false;
842 int ret;
843 842
844 mutex_lock(&dev->mode_config.mutex); 843 mutex_lock(&dev->mode_config.mutex);
845 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { 844 list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
@@ -874,11 +873,8 @@ static void output_poll_execute(struct work_struct *work)
874 dev->mode_config.funcs->output_poll_changed(dev); 873 dev->mode_config.funcs->output_poll_changed(dev);
875 } 874 }
876 875
877 if (repoll) { 876 if (repoll)
878 ret = queue_delayed_work(system_nrt_wq, delayed_work, DRM_OUTPUT_POLL_PERIOD); 877 queue_delayed_work(system_nrt_wq, delayed_work, DRM_OUTPUT_POLL_PERIOD);
879 if (ret)
880 DRM_ERROR("delayed enqueue failed %d\n", ret);
881 }
882} 878}
883 879
884void drm_kms_helper_poll_disable(struct drm_device *dev) 880void drm_kms_helper_poll_disable(struct drm_device *dev)
@@ -893,18 +889,14 @@ void drm_kms_helper_poll_enable(struct drm_device *dev)
893{ 889{
894 bool poll = false; 890 bool poll = false;
895 struct drm_connector *connector; 891 struct drm_connector *connector;
896 int ret;
897 892
898 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { 893 list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
899 if (connector->polled) 894 if (connector->polled)
900 poll = true; 895 poll = true;
901 } 896 }
902 897
903 if (poll) { 898 if (poll)
904 ret = queue_delayed_work(system_nrt_wq, &dev->mode_config.output_poll_work, DRM_OUTPUT_POLL_PERIOD); 899 queue_delayed_work(system_nrt_wq, &dev->mode_config.output_poll_work, DRM_OUTPUT_POLL_PERIOD);
905 if (ret)
906 DRM_ERROR("delayed enqueue failed %d\n", ret);
907 }
908} 900}
909EXPORT_SYMBOL(drm_kms_helper_poll_enable); 901EXPORT_SYMBOL(drm_kms_helper_poll_enable);
910 902