1
0
Fork 0

drm: use kernel macros

Make some of the DRM_ macros use the real kernel macros.

Signed-off-by: Dave Airlie <airlied@linux.ie>
hifive-unleashed-5.1
Dave Airlie 2005-09-25 13:25:41 +10:00 committed by Dave Airlie
parent 4e0c1159d8
commit 99a2657a29
1 changed files with 3 additions and 3 deletions

View File

@ -228,9 +228,9 @@
/** \name Internal types and structures */
/*@{*/
#define DRM_ARRAY_SIZE(x) (sizeof(x)/sizeof(x[0]))
#define DRM_MIN(a,b) ((a)<(b)?(a):(b))
#define DRM_MAX(a,b) ((a)>(b)?(a):(b))
#define DRM_ARRAY_SIZE(x) ARRAY_SIZE(x)
#define DRM_MIN(a,b) min(a,b)
#define DRM_MAX(a,b) max(a,b)
#define DRM_LEFTCOUNT(x) (((x)->rp + (x)->count - (x)->wp) % ((x)->count + 1))
#define DRM_BUFCOUNT(x) ((x)->count - DRM_LEFTCOUNT(x))