Commit d45c6c9b authored by Madhumitha Prabakaran's avatar Madhumitha Prabakaran Committed by Greg Kroah-Hartman

Staging: media: davinci_vpfe: Drop macro and use an in-kernel function

Drop macro CEIL and use an in-kernel function DIV_ROUND_UP.
Signed-off-by: default avatarMadhumitha Prabakaran <madhumithabiw@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent a35342d0
......@@ -27,8 +27,6 @@
#include "davinci_vpfe_user.h"
#include "vpfe_video.h"
#define CEIL(a, b) (((a) + (b-1)) / (b))
enum ipipe_noise_filter {
IPIPE_D2F_1ST = 0,
IPIPE_D2F_2ND = 1,
......
......@@ -386,7 +386,7 @@ resizer_calculate_down_scale_f_div_param(struct device *dev,
}
o = 10 + (two_power << 2);
if (((input_width << 7) / rsz) % 2)
o += (((CEIL(rsz, 1024)) << 1) << n);
o += ((DIV_ROUND_UP(rsz, 1024) << 1) << n);
h2 = output_width - h1;
/* phi */
val = (h1 * rsz) - (((upper_h1 - (o - 10)) / two_power) << 8);
......@@ -630,7 +630,7 @@ resizer_calculate_normal_f_div_param(struct device *dev, int input_width,
val /= rsz << 1;
val <<= 1;
val += 2;
o += ((CEIL(rsz, 1024)) << 1);
o += (DIV_ROUND_UP(rsz, 1024) << 1);
h1 = val;
}
h2 = output_width - h1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment