diff options
author | Dave Airlie <airlied@starflyer.(none)> | 2006-02-02 03:37:46 -0500 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2006-02-02 03:37:46 -0500 |
commit | 30e2fb188194908e48d3f27a53ccea6740eb1e98 (patch) | |
tree | eef1e9495aa6db6cddc67cf7f20369a3acdd2291 /drivers/char/drm/drm_irq.c | |
parent | ce60fe02fbe737cbce09e2ba5a2ef1efd20eff73 (diff) |
sem2mutex: drivers/char/drm/
From: Arjan van de Ven <arjan@infradead.org>
Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.
Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drm_irq.c')
-rw-r--r-- | drivers/char/drm/drm_irq.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/char/drm/drm_irq.c b/drivers/char/drm/drm_irq.c index b0d4b236e837..611a1173091d 100644 --- a/drivers/char/drm/drm_irq.c +++ b/drivers/char/drm/drm_irq.c | |||
@@ -98,20 +98,20 @@ static int drm_irq_install(drm_device_t * dev) | |||
98 | if (dev->irq == 0) | 98 | if (dev->irq == 0) |
99 | return -EINVAL; | 99 | return -EINVAL; |
100 | 100 | ||
101 | down(&dev->struct_sem); | 101 | mutex_lock(&dev->struct_mutex); |
102 | 102 | ||
103 | /* Driver must have been initialized */ | 103 | /* Driver must have been initialized */ |
104 | if (!dev->dev_private) { | 104 | if (!dev->dev_private) { |
105 | up(&dev->struct_sem); | 105 | mutex_unlock(&dev->struct_mutex); |
106 | return -EINVAL; | 106 | return -EINVAL; |
107 | } | 107 | } |
108 | 108 | ||
109 | if (dev->irq_enabled) { | 109 | if (dev->irq_enabled) { |
110 | up(&dev->struct_sem); | 110 | mutex_unlock(&dev->struct_mutex); |
111 | return -EBUSY; | 111 | return -EBUSY; |
112 | } | 112 | } |
113 | dev->irq_enabled = 1; | 113 | dev->irq_enabled = 1; |
114 | up(&dev->struct_sem); | 114 | mutex_unlock(&dev->struct_mutex); |
115 | 115 | ||
116 | DRM_DEBUG("%s: irq=%d\n", __FUNCTION__, dev->irq); | 116 | DRM_DEBUG("%s: irq=%d\n", __FUNCTION__, dev->irq); |
117 | 117 | ||
@@ -135,9 +135,9 @@ static int drm_irq_install(drm_device_t * dev) | |||
135 | ret = request_irq(dev->irq, dev->driver->irq_handler, | 135 | ret = request_irq(dev->irq, dev->driver->irq_handler, |
136 | sh_flags, dev->devname, dev); | 136 | sh_flags, dev->devname, dev); |
137 | if (ret < 0) { | 137 | if (ret < 0) { |
138 | down(&dev->struct_sem); | 138 | mutex_lock(&dev->struct_mutex); |
139 | dev->irq_enabled = 0; | 139 | dev->irq_enabled = 0; |
140 | up(&dev->struct_sem); | 140 | mutex_unlock(&dev->struct_mutex); |
141 | return ret; | 141 | return ret; |
142 | } | 142 | } |
143 | 143 | ||
@@ -161,10 +161,10 @@ int drm_irq_uninstall(drm_device_t * dev) | |||
161 | if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) | 161 | if (!drm_core_check_feature(dev, DRIVER_HAVE_IRQ)) |
162 | return -EINVAL; | 162 | return -EINVAL; |
163 | 163 | ||
164 | down(&dev->struct_sem); | 164 | mutex_lock(&dev->struct_mutex); |
165 | irq_enabled = dev->irq_enabled; | 165 | irq_enabled = dev->irq_enabled; |
166 | dev->irq_enabled = 0; | 166 | dev->irq_enabled = 0; |
167 | up(&dev->struct_sem); | 167 | mutex_unlock(&dev->struct_mutex); |
168 | 168 | ||
169 | if (!irq_enabled) | 169 | if (!irq_enabled) |
170 | return -EINVAL; | 170 | return -EINVAL; |