From: Dave Airlie Date: Sun, 25 Sep 2005 03:25:41 +0000 (+1000) Subject: drm: use kernel macros X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=99a2657a29e2d623c3568cd86b27cac13fb63140;p=GitHub%2Fmt8127%2Fandroid_kernel_alcatel_ttab.git drm: use kernel macros Make some of the DRM_ macros use the real kernel macros. Signed-off-by: Dave Airlie --- diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h index cf58a526a030..79221783a14c 100644 --- a/drivers/char/drm/drmP.h +++ b/drivers/char/drm/drmP.h @@ -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))