summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorKrzysztof Kozlowski <krzk@kernel.org>2017-04-11 21:08:34 +0300
committerHerbert Xu <herbert@gondor.apana.org.au>2017-04-21 15:30:44 +0300
commited067d4a859ff696373324c5061392e013a7561a (patch)
treead38c59cb06b548f56d1bbc38845a39b9091a056 /drivers/gpu/drm
parent7e207d8550644c1076ceb070f40abf52701253ec (diff)
downloadlinux-ed067d4a859ff696373324c5061392e013a7561a.tar.xz
linux/kernel.h: Add ALIGN_DOWN macro
Few parts of kernel define their own macro for aligning down so provide a common define for this, with the same usage and assumptions as existing ALIGN. Convert also three existing implementations to this one. Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/udl/udl_fb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/udl/udl_fb.c b/drivers/gpu/drm/udl/udl_fb.c
index 8e8d60e9a1a2..b1f0d523dff9 100644
--- a/drivers/gpu/drm/udl/udl_fb.c
+++ b/drivers/gpu/drm/udl/udl_fb.c
@@ -37,7 +37,7 @@ struct udl_fbdev {
};
#define DL_ALIGN_UP(x, a) ALIGN(x, a)
-#define DL_ALIGN_DOWN(x, a) ALIGN(x-(a-1), a)
+#define DL_ALIGN_DOWN(x, a) ALIGN_DOWN(x, a)
/** Read the red component (0..255) of a 32 bpp colour. */
#define DLO_RGB_GETRED(col) (uint8_t)((col) & 0xFF)