@@ -226,9 +226,8 @@ static int vc3_pfd_mux_set_parent(struct clk_hw *hw, u8 index)
226
226
struct vc3_hw_data * vc3 = container_of (hw , struct vc3_hw_data , hw );
227
227
const struct vc3_clk_data * pfd_mux = vc3 -> data ;
228
228
229
- regmap_update_bits (vc3 -> regmap , pfd_mux -> offs , pfd_mux -> bitmsk ,
230
- index ? pfd_mux -> bitmsk : 0 );
231
- return 0 ;
229
+ return regmap_update_bits (vc3 -> regmap , pfd_mux -> offs , pfd_mux -> bitmsk ,
230
+ index ? pfd_mux -> bitmsk : 0 );
232
231
}
233
232
234
233
static const struct clk_ops vc3_pfd_mux_ops = {
@@ -456,10 +455,8 @@ static int vc3_div_mux_set_parent(struct clk_hw *hw, u8 index)
456
455
struct vc3_hw_data * vc3 = container_of (hw , struct vc3_hw_data , hw );
457
456
const struct vc3_clk_data * div_mux = vc3 -> data ;
458
457
459
- regmap_update_bits (vc3 -> regmap , div_mux -> offs , div_mux -> bitmsk ,
460
- index ? div_mux -> bitmsk : 0 );
461
-
462
- return 0 ;
458
+ return regmap_update_bits (vc3 -> regmap , div_mux -> offs , div_mux -> bitmsk ,
459
+ index ? div_mux -> bitmsk : 0 );
463
460
}
464
461
465
462
static const struct clk_ops vc3_div_mux_ops = {
@@ -524,10 +521,9 @@ static int vc3_div_set_rate(struct clk_hw *hw, unsigned long rate,
524
521
525
522
value = divider_get_val (rate , parent_rate , div_data -> table ,
526
523
div_data -> width , div_data -> flags );
527
- regmap_update_bits (vc3 -> regmap , div_data -> offs ,
528
- VC3_DIV_MASK (div_data -> width ) << div_data -> shift ,
529
- value << div_data -> shift );
530
- return 0 ;
524
+ return regmap_update_bits (vc3 -> regmap , div_data -> offs ,
525
+ VC3_DIV_MASK (div_data -> width ) << div_data -> shift ,
526
+ value << div_data -> shift );
531
527
}
532
528
533
529
static const struct clk_ops vc3_div_ops = {
@@ -539,11 +535,9 @@ static const struct clk_ops vc3_div_ops = {
539
535
static int vc3_clk_mux_determine_rate (struct clk_hw * hw ,
540
536
struct clk_rate_request * req )
541
537
{
542
- int ret ;
543
538
int frc ;
544
539
545
- ret = clk_mux_determine_rate_flags (hw , req , CLK_SET_RATE_PARENT );
546
- if (ret ) {
540
+ if (clk_mux_determine_rate_flags (hw , req , CLK_SET_RATE_PARENT )) {
547
541
/* The below check is equivalent to (best_parent_rate/rate) */
548
542
if (req -> best_parent_rate >= req -> rate ) {
549
543
frc = DIV_ROUND_CLOSEST_ULL (req -> best_parent_rate ,
@@ -552,10 +546,9 @@ static int vc3_clk_mux_determine_rate(struct clk_hw *hw,
552
546
return clk_mux_determine_rate_flags (hw , req ,
553
547
CLK_SET_RATE_PARENT );
554
548
}
555
- ret = 0 ;
556
549
}
557
550
558
- return ret ;
551
+ return 0 ;
559
552
}
560
553
561
554
static u8 vc3_clk_mux_get_parent (struct clk_hw * hw )
@@ -574,9 +567,8 @@ static int vc3_clk_mux_set_parent(struct clk_hw *hw, u8 index)
574
567
struct vc3_hw_data * vc3 = container_of (hw , struct vc3_hw_data , hw );
575
568
const struct vc3_clk_data * clk_mux = vc3 -> data ;
576
569
577
- regmap_update_bits (vc3 -> regmap , clk_mux -> offs ,
578
- clk_mux -> bitmsk , index ? clk_mux -> bitmsk : 0 );
579
- return 0 ;
570
+ return regmap_update_bits (vc3 -> regmap , clk_mux -> offs , clk_mux -> bitmsk ,
571
+ index ? clk_mux -> bitmsk : 0 );
580
572
}
581
573
582
574
static const struct clk_ops vc3_clk_mux_ops = {
0 commit comments