Skip to content

Commit

Permalink
drm: fix LOCK_TEST_WITH_RETURN macro
Browse files Browse the repository at this point in the history
When this macro isn't called with 'file_priv' this will result in a build
failure.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Dave Airlie <airlied@redhat.com>
  • Loading branch information
Roel Kluin authored and Dave Airlie committed Jun 11, 2009
1 parent 03d6069 commit dcae362
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions include/drm/drmP.h
Original file line number Diff line number Diff line change
Expand Up @@ -237,15 +237,15 @@ struct drm_device;
* \param dev DRM device.
* \param filp file pointer of the caller.
*/
#define LOCK_TEST_WITH_RETURN( dev, file_priv ) \
do { \
if (!_DRM_LOCK_IS_HELD(file_priv->master->lock.hw_lock->lock) || \
file_priv->master->lock.file_priv != file_priv) { \
#define LOCK_TEST_WITH_RETURN( dev, _file_priv ) \
do { \
if (!_DRM_LOCK_IS_HELD(_file_priv->master->lock.hw_lock->lock) || \
_file_priv->master->lock.file_priv != _file_priv) { \
DRM_ERROR( "%s called without lock held, held %d owner %p %p\n",\
__func__, _DRM_LOCK_IS_HELD(file_priv->master->lock.hw_lock->lock),\
file_priv->master->lock.file_priv, file_priv); \
return -EINVAL; \
} \
__func__, _DRM_LOCK_IS_HELD(_file_priv->master->lock.hw_lock->lock),\
_file_priv->master->lock.file_priv, _file_priv); \
return -EINVAL; \
} \
} while (0)

/**
Expand Down

0 comments on commit dcae362

Please sign in to comment.