diff options
author | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2013-10-18 18:48:24 -0300 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-10-21 10:04:03 +0200 |
commit | de45eaf7b9530b6137d3ce370b12b199fae01419 (patch) | |
tree | d90b0f00787b77768f3b650b15e0fb8326f2e45f /drivers/gpu/drm/i915/i915_gem.c | |
parent | dc39fff7229c01550cad1ee8fa0309dfafdcd2e7 (diff) | |
download | talos-obmc-linux-de45eaf7b9530b6137d3ce370b12b199fae01419.tar.gz talos-obmc-linux-de45eaf7b9530b6137d3ce370b12b199fae01419.zip |
drm/i915: fix open-coded DIV_ROUND_UP
Use the nice Kernel macro, it makes the code much more readable.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_gem.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_gem.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index 34df59b660f8..e7b39d731db6 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -261,7 +261,7 @@ i915_gem_dumb_create(struct drm_file *file, struct drm_mode_create_dumb *args) { /* have to work out size/pitch and return them */ - args->pitch = ALIGN(args->width * ((args->bpp + 7) / 8), 64); + args->pitch = ALIGN(args->width * DIV_ROUND_UP(args->bpp, 8), 64); args->size = args->pitch * args->height; return i915_gem_create(file, dev, args->size, &args->handle); |