diff options
Diffstat (limited to 'drivers/char/drm/drm_fops.c')
-rw-r--r-- | drivers/char/drm/drm_fops.c | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/drivers/char/drm/drm_fops.c b/drivers/char/drm/drm_fops.c index 906794247ae..10e64fde8d7 100644 --- a/drivers/char/drm/drm_fops.c +++ b/drivers/char/drm/drm_fops.c | |||
@@ -37,6 +37,8 @@ | |||
37 | #include "drmP.h" | 37 | #include "drmP.h" |
38 | #include <linux/poll.h> | 38 | #include <linux/poll.h> |
39 | 39 | ||
40 | static int drm_open_helper(struct inode *inode, struct file *filp, drm_device_t *dev); | ||
41 | |||
40 | static int drm_setup( drm_device_t *dev ) | 42 | static int drm_setup( drm_device_t *dev ) |
41 | { | 43 | { |
42 | int i; | 44 | int i; |
@@ -251,7 +253,7 @@ int drm_release( struct inode *inode, struct file *filp ) | |||
251 | } | 253 | } |
252 | } | 254 | } |
253 | 255 | ||
254 | if (drm_core_check_feature(dev, DRIVER_HAVE_DMA)) | 256 | if (drm_core_check_feature(dev, DRIVER_HAVE_DMA) && !dev->driver->release) |
255 | { | 257 | { |
256 | dev->driver->reclaim_buffers(dev, filp); | 258 | dev->driver->reclaim_buffers(dev, filp); |
257 | } | 259 | } |
@@ -259,7 +261,7 @@ int drm_release( struct inode *inode, struct file *filp ) | |||
259 | drm_fasync( -1, filp, 0 ); | 261 | drm_fasync( -1, filp, 0 ); |
260 | 262 | ||
261 | down( &dev->ctxlist_sem ); | 263 | down( &dev->ctxlist_sem ); |
262 | if ( !list_empty( &dev->ctxlist->head ) ) { | 264 | if ( dev->ctxlist && (!list_empty(&dev->ctxlist->head))) { |
263 | drm_ctx_list_t *pos, *n; | 265 | drm_ctx_list_t *pos, *n; |
264 | 266 | ||
265 | list_for_each_entry_safe( pos, n, &dev->ctxlist->head, head ) { | 267 | list_for_each_entry_safe( pos, n, &dev->ctxlist->head, head ) { |
@@ -341,7 +343,7 @@ EXPORT_SYMBOL(drm_release); | |||
341 | * Creates and initializes a drm_file structure for the file private data in \p | 343 | * Creates and initializes a drm_file structure for the file private data in \p |
342 | * filp and add it into the double linked list in \p dev. | 344 | * filp and add it into the double linked list in \p dev. |
343 | */ | 345 | */ |
344 | int drm_open_helper(struct inode *inode, struct file *filp, drm_device_t *dev) | 346 | static int drm_open_helper(struct inode *inode, struct file *filp, drm_device_t *dev) |
345 | { | 347 | { |
346 | int minor = iminor(inode); | 348 | int minor = iminor(inode); |
347 | drm_file_t *priv; | 349 | drm_file_t *priv; |
@@ -443,9 +445,3 @@ unsigned int drm_poll(struct file *filp, struct poll_table_struct *wait) | |||
443 | } | 445 | } |
444 | EXPORT_SYMBOL(drm_poll); | 446 | EXPORT_SYMBOL(drm_poll); |
445 | 447 | ||
446 | |||
447 | /** No-op. */ | ||
448 | ssize_t drm_read(struct file *filp, char __user *buf, size_t count, loff_t *off) | ||
449 | { | ||
450 | return 0; | ||
451 | } | ||