diff options
Diffstat (limited to 'drivers/char/drm/drm_drawable.c')
-rw-r--r-- | drivers/char/drm/drm_drawable.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/char/drm/drm_drawable.c b/drivers/char/drm/drm_drawable.c index b33313be2547..87dabd994618 100644 --- a/drivers/char/drm/drm_drawable.c +++ b/drivers/char/drm/drm_drawable.c | |||
@@ -47,9 +47,9 @@ int drm_adddraw(DRM_IOCTL_ARGS) | |||
47 | int i, j; | 47 | int i, j; |
48 | u32 *bitfield = dev->drw_bitfield; | 48 | u32 *bitfield = dev->drw_bitfield; |
49 | unsigned int bitfield_length = dev->drw_bitfield_length; | 49 | unsigned int bitfield_length = dev->drw_bitfield_length; |
50 | drm_drawable_info_t **info = dev->drw_info; | 50 | struct drm_drawable_info **info = dev->drw_info; |
51 | unsigned int info_length = dev->drw_info_length; | 51 | unsigned int info_length = dev->drw_info_length; |
52 | drm_draw_t draw; | 52 | struct drm_draw draw; |
53 | 53 | ||
54 | for (i = 0, j = 0; i < bitfield_length; i++) { | 54 | for (i = 0, j = 0; i < bitfield_length; i++) { |
55 | if (bitfield[i] == ~0) | 55 | if (bitfield[i] == ~0) |
@@ -120,7 +120,7 @@ done: | |||
120 | 120 | ||
121 | spin_unlock_irqrestore(&dev->drw_lock, irqflags); | 121 | spin_unlock_irqrestore(&dev->drw_lock, irqflags); |
122 | 122 | ||
123 | DRM_COPY_TO_USER_IOCTL((drm_draw_t __user *)data, draw, sizeof(draw)); | 123 | DRM_COPY_TO_USER_IOCTL((struct drm_draw __user *)data, draw, sizeof(draw)); |
124 | 124 | ||
125 | return 0; | 125 | return 0; |
126 | } | 126 | } |
@@ -131,16 +131,16 @@ done: | |||
131 | int drm_rmdraw(DRM_IOCTL_ARGS) | 131 | int drm_rmdraw(DRM_IOCTL_ARGS) |
132 | { | 132 | { |
133 | DRM_DEVICE; | 133 | DRM_DEVICE; |
134 | drm_draw_t draw; | 134 | struct drm_draw draw; |
135 | int id, idx; | 135 | int id, idx; |
136 | unsigned int shift; | 136 | unsigned int shift; |
137 | unsigned long irqflags; | 137 | unsigned long irqflags; |
138 | u32 *bitfield = dev->drw_bitfield; | 138 | u32 *bitfield = dev->drw_bitfield; |
139 | unsigned int bitfield_length = dev->drw_bitfield_length; | 139 | unsigned int bitfield_length = dev->drw_bitfield_length; |
140 | drm_drawable_info_t **info = dev->drw_info; | 140 | struct drm_drawable_info **info = dev->drw_info; |
141 | unsigned int info_length = dev->drw_info_length; | 141 | unsigned int info_length = dev->drw_info_length; |
142 | 142 | ||
143 | DRM_COPY_FROM_USER_IOCTL(draw, (drm_draw_t __user *) data, | 143 | DRM_COPY_FROM_USER_IOCTL(draw, (struct drm_draw __user *) data, |
144 | sizeof(draw)); | 144 | sizeof(draw)); |
145 | 145 | ||
146 | id = draw.handle - 1; | 146 | id = draw.handle - 1; |
@@ -161,7 +161,7 @@ int drm_rmdraw(DRM_IOCTL_ARGS) | |||
161 | 161 | ||
162 | if (info[id]) { | 162 | if (info[id]) { |
163 | drm_free(info[id]->rects, info[id]->num_rects * | 163 | drm_free(info[id]->rects, info[id]->num_rects * |
164 | sizeof(drm_clip_rect_t), DRM_MEM_BUFS); | 164 | sizeof(struct drm_clip_rect), DRM_MEM_BUFS); |
165 | drm_free(info[id], sizeof(**info), DRM_MEM_BUFS); | 165 | drm_free(info[id], sizeof(**info), DRM_MEM_BUFS); |
166 | } | 166 | } |
167 | 167 | ||
@@ -230,15 +230,15 @@ int drm_rmdraw(DRM_IOCTL_ARGS) | |||
230 | 230 | ||
231 | int drm_update_drawable_info(DRM_IOCTL_ARGS) { | 231 | int drm_update_drawable_info(DRM_IOCTL_ARGS) { |
232 | DRM_DEVICE; | 232 | DRM_DEVICE; |
233 | drm_update_draw_t update; | 233 | struct drm_update_draw update; |
234 | unsigned int id, idx, shift; | 234 | unsigned int id, idx, shift; |
235 | u32 *bitfield = dev->drw_bitfield; | 235 | u32 *bitfield = dev->drw_bitfield; |
236 | unsigned long irqflags, bitfield_length = dev->drw_bitfield_length; | 236 | unsigned long irqflags, bitfield_length = dev->drw_bitfield_length; |
237 | drm_drawable_info_t *info; | 237 | struct drm_drawable_info *info; |
238 | drm_clip_rect_t *rects; | 238 | struct drm_clip_rect *rects; |
239 | int err; | 239 | int err; |
240 | 240 | ||
241 | DRM_COPY_FROM_USER_IOCTL(update, (drm_update_draw_t __user *) data, | 241 | DRM_COPY_FROM_USER_IOCTL(update, (struct drm_update_draw __user *) data, |
242 | sizeof(update)); | 242 | sizeof(update)); |
243 | 243 | ||
244 | id = update.handle - 1; | 244 | id = update.handle - 1; |
@@ -254,7 +254,7 @@ int drm_update_drawable_info(DRM_IOCTL_ARGS) { | |||
254 | info = dev->drw_info[id]; | 254 | info = dev->drw_info[id]; |
255 | 255 | ||
256 | if (!info) { | 256 | if (!info) { |
257 | info = drm_calloc(1, sizeof(drm_drawable_info_t), DRM_MEM_BUFS); | 257 | info = drm_calloc(1, sizeof(struct drm_drawable_info), DRM_MEM_BUFS); |
258 | 258 | ||
259 | if (!info) { | 259 | if (!info) { |
260 | DRM_ERROR("Failed to allocate drawable info memory\n"); | 260 | DRM_ERROR("Failed to allocate drawable info memory\n"); |
@@ -265,7 +265,7 @@ int drm_update_drawable_info(DRM_IOCTL_ARGS) { | |||
265 | switch (update.type) { | 265 | switch (update.type) { |
266 | case DRM_DRAWABLE_CLIPRECTS: | 266 | case DRM_DRAWABLE_CLIPRECTS: |
267 | if (update.num != info->num_rects) { | 267 | if (update.num != info->num_rects) { |
268 | rects = drm_alloc(update.num * sizeof(drm_clip_rect_t), | 268 | rects = drm_alloc(update.num * sizeof(struct drm_clip_rect), |
269 | DRM_MEM_BUFS); | 269 | DRM_MEM_BUFS); |
270 | } else | 270 | } else |
271 | rects = info->rects; | 271 | rects = info->rects; |
@@ -277,7 +277,7 @@ int drm_update_drawable_info(DRM_IOCTL_ARGS) { | |||
277 | } | 277 | } |
278 | 278 | ||
279 | if (update.num && DRM_COPY_FROM_USER(rects, | 279 | if (update.num && DRM_COPY_FROM_USER(rects, |
280 | (drm_clip_rect_t __user *) | 280 | (struct drm_clip_rect __user *) |
281 | (unsigned long)update.data, | 281 | (unsigned long)update.data, |
282 | update.num * | 282 | update.num * |
283 | sizeof(*rects))) { | 283 | sizeof(*rects))) { |
@@ -290,7 +290,7 @@ int drm_update_drawable_info(DRM_IOCTL_ARGS) { | |||
290 | 290 | ||
291 | if (rects != info->rects) { | 291 | if (rects != info->rects) { |
292 | drm_free(info->rects, info->num_rects * | 292 | drm_free(info->rects, info->num_rects * |
293 | sizeof(drm_clip_rect_t), DRM_MEM_BUFS); | 293 | sizeof(struct drm_clip_rect), DRM_MEM_BUFS); |
294 | } | 294 | } |
295 | 295 | ||
296 | info->rects = rects; | 296 | info->rects = rects; |
@@ -314,7 +314,7 @@ error: | |||
314 | drm_free(info, sizeof(*info), DRM_MEM_BUFS); | 314 | drm_free(info, sizeof(*info), DRM_MEM_BUFS); |
315 | else if (rects != dev->drw_info[id]->rects) | 315 | else if (rects != dev->drw_info[id]->rects) |
316 | drm_free(rects, update.num * | 316 | drm_free(rects, update.num * |
317 | sizeof(drm_clip_rect_t), DRM_MEM_BUFS); | 317 | sizeof(struct drm_clip_rect), DRM_MEM_BUFS); |
318 | 318 | ||
319 | return err; | 319 | return err; |
320 | } | 320 | } |
@@ -322,7 +322,7 @@ error: | |||
322 | /** | 322 | /** |
323 | * Caller must hold the drawable spinlock! | 323 | * Caller must hold the drawable spinlock! |
324 | */ | 324 | */ |
325 | drm_drawable_info_t *drm_get_drawable_info(drm_device_t *dev, drm_drawable_t id) { | 325 | struct drm_drawable_info *drm_get_drawable_info(drm_device_t *dev, drm_drawable_t id) { |
326 | u32 *bitfield = dev->drw_bitfield; | 326 | u32 *bitfield = dev->drw_bitfield; |
327 | unsigned int idx, shift; | 327 | unsigned int idx, shift; |
328 | 328 | ||