bcm27xx: add support for linux v5.15
[openwrt/staging/chunkeey.git] / target / linux / bcm27xx / patches-5.15 / 950-0872-rpivid-Use-clk_get_max_rate.patch
1 From 041b014362c7fdcf82972b738708f3d2c1aef23e Mon Sep 17 00:00:00 2001
2 From: Maxime Ripard <maxime@cerno.tech>
3 Date: Fri, 15 Apr 2022 15:26:07 +0200
4 Subject: [PATCH] rpivid: Use clk_get_max_rate()
5
6 The driver was using clk_round_rate() to figure out the maximum clock
7 rate that was allowed for the HEVC clock.
8
9 Since we have a function to return it directly now, let's use it.
10
11 Signed-off-by: Maxime Ripard <maxime@cerno.tech>
12 ---
13 drivers/staging/media/rpivid/rpivid_video.c | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16 --- a/drivers/staging/media/rpivid/rpivid_video.c
17 +++ b/drivers/staging/media/rpivid/rpivid_video.c
18 @@ -558,7 +558,7 @@ static int start_clock(struct rpivid_dev
19 long max_hevc_clock;
20 int rv;
21
22 - max_hevc_clock = clk_round_rate(dev->clock, ULONG_MAX);
23 + max_hevc_clock = clk_get_max_rate(dev->clock);
24
25 rv = clk_set_min_rate(dev->clock, max_hevc_clock);
26 if (rv) {