summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/nouveau/nv50_instmem.c
diff options
context:
space:
mode:
authorMatt Turner <mattst88@gmail.com>2010-02-25 05:27:10 +0100
committerBen Skeggs <bskeggs@redhat.com>2010-02-25 06:09:46 +0100
commit3bfc7d22d0400e85a93e835d4398dcbe0af68b0b (patch)
tree0c055a016b8ee5f752a5ac079e69ba054f4ac064 /drivers/gpu/drm/nouveau/nv50_instmem.c
parentdrm/nouveau: report unknown connector state if lid closed (diff)
downloadlinux-3bfc7d22d0400e85a93e835d4398dcbe0af68b0b.tar.xz
linux-3bfc7d22d0400e85a93e835d4398dcbe0af68b0b.zip
drm/nouveau: use ALIGN instead of open coding it
CC: Ben Skeggs <bskeggs@redhat.com> Signed-off-by: Matt Turner <mattst88@gmail.com> Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/nouveau/nv50_instmem.c')
-rw-r--r--drivers/gpu/drm/nouveau/nv50_instmem.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/nouveau/nv50_instmem.c b/drivers/gpu/drm/nouveau/nv50_instmem.c
index f0dc4e36ef05..de1f5b0062c5 100644
--- a/drivers/gpu/drm/nouveau/nv50_instmem.c
+++ b/drivers/gpu/drm/nouveau/nv50_instmem.c
@@ -390,7 +390,7 @@ nv50_instmem_populate(struct drm_device *dev, struct nouveau_gpuobj *gpuobj,
if (gpuobj->im_backing)
return -EINVAL;
- *sz = (*sz + (NV50_INSTMEM_PAGE_SIZE-1)) & ~(NV50_INSTMEM_PAGE_SIZE-1);
+ *sz = ALIGN(*sz, NV50_INSTMEM_PAGE_SIZE);
if (*sz == 0)
return -EINVAL;