diff options
author | Madhumitha Prabakaran <madhumithabiw@gmail.com> | 2019-04-02 13:11:46 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-04-03 11:08:00 +0200 |
commit | d45c6c9bbfb3e543e5b0e6bc5af4ec9f51dbac23 (patch) | |
tree | ad0b0fd5d9bc54a6e20bfc27b964914d9c6aea3f | |
parent | a35342d0f8b348fad38e6250f9b646b99aa210c7 (diff) |
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>
-rw-r--r-- | drivers/staging/media/davinci_vpfe/dm365_ipipe.h | 2 | ||||
-rw-r--r-- | drivers/staging/media/davinci_vpfe/dm365_resizer.c | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipe.h b/drivers/staging/media/davinci_vpfe/dm365_ipipe.h index 174334b53f96..866ae12aeb07 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipe.h +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipe.h @@ -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, diff --git a/drivers/staging/media/davinci_vpfe/dm365_resizer.c b/drivers/staging/media/davinci_vpfe/dm365_resizer.c index 9d726298b406..d460963106fa 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_resizer.c +++ b/drivers/staging/media/davinci_vpfe/dm365_resizer.c @@ -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; |