mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
media: i2c: ds90ub953: convert from round_rate() to determine_rate()
The round_rate() clk ops is deprecated, so migrate this driver from round_rate() to determine_rate() using the Coccinelle semantic patch on the cover letter of this series. Signed-off-by: Brian Masney <bmasney@redhat.com> Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> Signed-off-by: Hans Verkuil <hverkuil+cisco@kernel.org>
This commit is contained in:
parent
17dc8ccd6d
commit
8a9f914e2e
1 changed files with 7 additions and 5 deletions
|
|
@ -1023,15 +1023,17 @@ static unsigned long ub953_clkout_recalc_rate(struct clk_hw *hw,
|
|||
return rate;
|
||||
}
|
||||
|
||||
static long ub953_clkout_round_rate(struct clk_hw *hw, unsigned long rate,
|
||||
unsigned long *parent_rate)
|
||||
static int ub953_clkout_determine_rate(struct clk_hw *hw,
|
||||
struct clk_rate_request *req)
|
||||
{
|
||||
struct ub953_data *priv = container_of(hw, struct ub953_data, clkout_clk_hw);
|
||||
struct ub953_clkout_data clkout_data;
|
||||
|
||||
ub953_calc_clkout_params(priv, rate, &clkout_data);
|
||||
ub953_calc_clkout_params(priv, req->rate, &clkout_data);
|
||||
|
||||
return clkout_data.rate;
|
||||
req->rate = clkout_data.rate;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int ub953_clkout_set_rate(struct clk_hw *hw, unsigned long rate,
|
||||
|
|
@ -1050,7 +1052,7 @@ static int ub953_clkout_set_rate(struct clk_hw *hw, unsigned long rate,
|
|||
|
||||
static const struct clk_ops ub953_clkout_ops = {
|
||||
.recalc_rate = ub953_clkout_recalc_rate,
|
||||
.round_rate = ub953_clkout_round_rate,
|
||||
.determine_rate = ub953_clkout_determine_rate,
|
||||
.set_rate = ub953_clkout_set_rate,
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue