1
0

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: Madhumitha Prabakaran <madhumithabiw@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
Madhumitha Prabakaran
2019-04-02 13:11:46 -05:00
committed by Greg Kroah-Hartman
parent a35342d0f8
commit d45c6c9bbf
2 changed files with 2 additions and 4 deletions

View File

@@ -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,

View File

@@ -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;