diff options
Diffstat (limited to 'drivers/gpu')
| -rw-r--r-- | drivers/gpu/drm/drm_file.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/gpu/drm/drm_file.c b/drivers/gpu/drm/drm_file.c index 3783b659cd38..caad93dab54b 100644 --- a/drivers/gpu/drm/drm_file.c +++ b/drivers/gpu/drm/drm_file.c | |||
| @@ -351,9 +351,8 @@ void drm_lastclose(struct drm_device * dev) | |||
| 351 | * | 351 | * |
| 352 | * This function must be used by drivers as their &file_operations.release | 352 | * This function must be used by drivers as their &file_operations.release |
| 353 | * method. It frees any resources associated with the open file, and calls the | 353 | * method. It frees any resources associated with the open file, and calls the |
| 354 | * &drm_driver.preclose and &drm_driver.lastclose driver callbacks. If this is | 354 | * &drm_driver.postclose driver callback. If this is the last open file for the |
| 355 | * the last open file for the DRM device also proceeds to call the | 355 | * DRM device also proceeds to call the &drm_driver.lastclose driver callback. |
| 356 | * &drm_driver.lastclose driver callback. | ||
| 357 | * | 356 | * |
| 358 | * RETURNS: | 357 | * RETURNS: |
| 359 | * | 358 | * |
| @@ -373,7 +372,8 @@ int drm_release(struct inode *inode, struct file *filp) | |||
| 373 | list_del(&file_priv->lhead); | 372 | list_del(&file_priv->lhead); |
| 374 | mutex_unlock(&dev->filelist_mutex); | 373 | mutex_unlock(&dev->filelist_mutex); |
| 375 | 374 | ||
| 376 | if (dev->driver->preclose) | 375 | if (drm_core_check_feature(dev, DRIVER_LEGACY) && |
| 376 | dev->driver->preclose) | ||
| 377 | dev->driver->preclose(dev, file_priv); | 377 | dev->driver->preclose(dev, file_priv); |
| 378 | 378 | ||
| 379 | /* ======================================================== | 379 | /* ======================================================== |
